Я хочу использовать
Cloudflare-bypass.
Я использую https://github.com/jaymoulin/guzzlehttp-cloudflare/.
Это мой код
$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( '/tmp' ),
]; // 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!!
Ошибка: -
Fatal error: Uncaught Error: Class 'CloudflareBypass\Storage' not found in
Кто-нибудь знает, как я могу использовать это правильно?
Кроме того, можно Я использую куки с Cloudflare-bypass?