sa/guzzlehttp-cloudflare

Bypass Cloudflare protection using GuzzleHTTP

0.1.4 2019-02-07 09:01 UTC

This package is auto-updated.

Last update: 2024-07-07 22:05:06 UTC


README

logo

Guzzle Cloudflare Bypass

latest release Bitcoin donation Litecoin donation PayPal donation

Bypass Cloudflare DDoS protection - Please use it carefully

This package is based on KyranRana's cloudflare-bypass.

Installation

Using composer

composer require jaymoulin/guzzlehttp-cloudflare

Usage

$sUrl = 'https://thebot.net/';
$oClient = new \GuzzleHttp\Client([
    'cookies' => new \GuzzleHttp\Cookie\FileCookieJar(tempnam('/tmp', __CLASS__)),
    'headers' => ['Referer' => $sUrl],
]); // 1. Create Guzzle instance
/** @var \GuzzleHttp\HandlerStack $oHandler */
$oHandler = $oClient->getConfig('handler');
$oHandler->push(\GuzzleCloudflare\Middleware::create()); //2. ???

echo (string)$oClient->request('GET', $sUrl)->getBody(); //3. Profit!!