Recommend this page to a friend! |
![]() ![]() |
Info | ![]() |
![]() |
![]() ![]() |
Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2021-10-18 (5 days ago) ![]() | Not yet rated by the users | Total: 28 This week: 28 | All time: 10,326 This week: 5![]() |
Version | License | PHP version | Categories | |||
reactphp-querylist 1.0.0 | Shareware | 5 | HTTP, PHP 5, Language |
Description | Author | ||||||||||||||
This package can retrieve Web pages asynchronously using ReactPHP. |
|
This library brought ReactPHP and QueryList together.
composer require ahmard/reactphp-querylist
Playing with QueryList(scraping)
use ReactphpQuerylist\Client;
use ReactphpQuerylist\Queryable;
require 'vendor/autoload.php';
Client::get('https://google.com')
->then(function (Queryable $queryable){
$title = $queryable->queryList()->find('head title')->text();
var_dump($title);
})
->otherwise(function ($error){
echo $error;
});
- Working with response object
use ReactphpQuerylist\Client;
use ReactphpQuerylist\Queryable;
require 'vendor/autoload.php';
Client::get('https://google.com')
->then(function (Queryable $queryable){
var_dump($queryable->response()->getReasonPhrase());
})
->otherwise(function ($error){
echo $error;
});
Files
File
Role
Description
src (2 files)
tests (2 files)
composer.json
Data
Auxiliary data
phpstan.neon
Data
Auxiliary data
phpunit.xml
Data
Auxiliary data
README.md
Doc.
Documentation
Version Control Unique User Downloads Download Rankings 100% Total: 28 This week: 28
All time: 10,326 This week: 5 
Applications that use this package
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.