PHP Classes

React PHP Querylist: Retrieve Web pages asynchronously using ReactPHP

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 42 All time: 10,853 This week: 673Up
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: 24 packages by
Country: Nigeria Nigeria
Age: ???
All time rank: 226511 in Nigeria Nigeria
Week rank: 178 Up7 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 (8)  
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 (8)  /  src  
File Role Description
  Plain text file Client.php Class Class source
  Plain text file Queryable.php Class Class source

  Files folder image Files (8)  /  tests  
File Role Description
  Plain text file ClientTest.php Class Class source
  Plain text file 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 Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:42
This week:0
All time:10,853
This week:673Up