tunaabutbul/cloudflare-middleware

Cloudflare Middleware For Guzzle

v1.2 2018-02-07 09:18 UTC

README

Bypass Cloudflare Middleware For Guzzle

Installation

Using composer:

composer require tunaabutbul/cloudflare-middleware

Usage

use GuzzleHttp\Client;
use Tuna\CloudflareMiddleware;
use GuzzleHttp\Cookie\FileCookieJar;

$client = new Client(['cookies' => new FileCookieJar('cookies.txt')]);

$client->getConfig('handler')->push(CloudflareMiddleware::create());

$res = $client->request('GET', 'http://www.exemple.com/');
echo $res->getBody();

Thanks

License

This middleware is licensed under the MIT License - see the LICENSE file for details