Content-Length: 266459 | pFad | http://github.com/Ahmard/reactphp-querylist

A3 GitHub - Ahmard/reactphp-querylist: This library brought ReactPHP and QueryList together
Skip to content

Ahmard/reactphp-querylist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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;
    });

About

This library brought ReactPHP and QueryList together

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/Ahmard/reactphp-querylist

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy