sa / guzzlehttp-cloudflare
Bypass Cloudflare protection using GuzzleHTTP
Installs: 271
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 12
pkg:composer/sa/guzzlehttp-cloudflare
Requires
- php: >=5.5
- guzzlehttp/guzzle: ^6.3
- kyranrana/cloudflare-bypass: ^v2.0
README
Guzzle Cloudflare Bypass
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!!