lantosbro/guzzlehttp-cloudflare
Composer 安装命令:
composer require lantosbro/guzzlehttp-cloudflare
包简介
Bypass Cloudflare protection using GuzzleHTTP
README 文档
README
Guzzle Cloudflare Bypass
(This product is available under a free and permissive license, but needs financial support to sustain its continued improvements. In addition to maintenance and stability there are many desirable features yet to be added.)
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 $aOptions = [ 'cache' => new \CloudflareBypass\Storage($sPathToYourCacheFolder), ]; // Example for cache, this is completely optional, with $sPathToYourCacheFolder a string to your cache folder /** @var \GuzzleHttp\HandlerStack $oHandler */ $oHandler = $oClient->getConfig('handler'); $oHandler->push(\GuzzleCloudflare\Middleware::create($aOptions)); //2. ??? echo (string)$oClient->request('GET', $sUrl)->getBody(); //3. Profit!!
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-10-17

