Bypass Cloudflare Middleware For Guzzle
Using composer:
composer require tunaabutbul/cloudflare-middleware
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();
This middleware is licensed under the MIT License - see the LICENSE file for details