Recommend this page to a friend! |
Download |
Info | Documentation | Files | Install with Composer | Download | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not yet rated by the users | Total: 42 | All time: 10,853 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 |
Files (8) | / | src |
File | Role | Description |
---|---|---|
Client.php | Class | Class source |
Queryable.php | Class | Class source |
Files (8) | / | tests |
File | Role | Description |
---|---|---|
ClientTest.php | Class | Class source |
TestableClient.php | Class | Class source |
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% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.