React PHP Querylist: Retrieve Web pages asynchronously using ReactPHP

Recommend this page to a friend!
  Info   View files Documentation   View files View files (8)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2021-10-18 (5 days ago) RSS 2.0 feedNot yet rated by the usersTotal: 28 This week: 28All time: 10,326 This week: 5Up
Version License PHP version Categories
reactphp-querylist 1.0.0Shareware5HTTP, PHP 5, Language
Description Author

This package can retrieve Web pages asynchronously using ReactPHP.

It uses the ReactPHP library to send HTTP requests to retrieve Web pages from remote sites without blocking other activities, like for instance queue requests to retrieve more than one page at the same time.

The package can register callback functions to handle the success or the failure of the HTTP requests.

Picture of Ahmad Mustapha
Name: Ahmad Mustapha <contact>
Classes: 15 packages by
Country: Nigeria Nigeria
Innovation award
Innovation award
Nominee: 5x

Details

ReactPHP QueryList

This library brought ReactPHP and QueryList together.

Installation

composer require ahmard/reactphp-querylist

Usage

  • 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 folder image Files  
File Role Description
Files folder imagesrc (2 files)
Files folder imagetests (2 files)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file phpstan.neon Data Auxiliary data
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  src  
File Role Description
  Plain text file Client.php Class Class source
  Plain text file Queryable.php Class Class source

  Files folder image Files  /  tests  
File Role Description
  Plain text file ClientTest.php Class Class source
  Plain text file TestableClient.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:28
This week:28
All time:10,326
This week:5Up
For more information send a message to info at phpclasses dot org.