PHP Classes

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    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 42 This week: 1All time: 10,799 This week: 560Up
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: 23 packages by
Country: Nigeria Nigeria
Age: ???
All time rank: 229912 in Nigeria Nigeria
Week rank: 52 Up5 in Nigeria Nigeria Up
Innovation award
Innovation award
Nominee: 9x

Documentation

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:42
This week:1
All time:10,799
This week:560Up