Recommend this page to a friend! |
![]() |
Info | Documentation | ![]() |
![]() |
![]() |
Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not yet rated by the users | Total: 42 | All time: 10,880 This week: 673![]() |
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 (8)
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
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer
Version Control Unique User Downloads Download Rankings 100% Total: 42 This week: 0
All time: 10,880 This week: 673 
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.