Recommend this page to a friend! |
Download .zip |
Info | Documentation | View files (8) | Download .zip | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not yet rated by the users | Total: 42 This week: 1 | All time: 10,799 This week: 560 |
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 |
Files | / | tests |
File | Role | Description |
---|---|---|
ClientTest.php | Class | Class source |
TestableClient.php | Class | Class source |
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.