KyranRana / cloudflare-bypass

A new and improved PHP library which bypasses the Cloudflare IUAM page using cURL
MIT License
275 stars 97 forks source link

Where are autoload.php? #133

Closed Laky-64 closed 5 years ago

Laky-64 commented 5 years ago

I downloaded the code via GIT, but I can't find autoload.php, I can't load the libraries accordingly

require "../../../vendor/autoload.php";

use CloudflareBypass\CFCurlImpl;
use CloudflareBypass\Model\UAMOptions;

$ch = curl_init("https://altadefinizione.cloud/");

// Want to cache clearance cookies ?
// curl_setopt($ch, CURLOPT_COOKIEJAR, "cookies.txt");
// curl_setopt($ch, CURLOPT_COOKIEFILE, "cookies.txt");

curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER,
    array("User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36"));

$cfCurl = new CFCurlImpl();

$cfOptions = new UAMOptions();
 $cfOptions->setVerbose(true);
// $cfOptions->setDelay(5);

try {
    $page = $cfCurl->exec($ch, $cfOptions);
} catch (ErrorException $ex) {
    // example of how to handle errors
    echo "Unknown error -> " . $ex->getMessage();
}

// Want to get clearance cookies ?
// $cookies = curl_getinfo($ch, CURLINFO_COOKIELIST);

echo $page;
ghost commented 5 years ago

Install composer and run composer install