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

Error 503 #120

Closed tompicca closed 5 years ago

tompicca commented 5 years ago

Hi guys! I use streamcontext.php:

<?php
require __DIR__ . '/../src/autoload.php';

use CloudflareBypass\RequestMethod\CFStream;

$stream_cf_wrapper = new CFStream(array(
    'max_retries'   => 5,                       // How many times to try and get clearance?
    'cache'         => false,                   // Enable caching?
    'cache_path'    => __DIR__ . '/cache',      // Where to cache cookies? (Default: system tmp directory)
    'verbose'       => true                     // Enable verbose? (Good for debugging issues - doesn't effect context)
));

// Get Example: 1
$opts = array(
    'http' => array(
        'method' => "GET",
        'header' => array(
            'accept: */*',       // required
            'host: alta-definizione.mobi',    // required
            'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36'
        )
    )
);

$url = "http://alta-definizione.mobi/007-al-servizio-segreto-di-sua-maesta-streaming-hd/";
$ctx = $stream_cf_wrapper->contextCreate( $url, stream_context_create( $opts ) );

echo file_get_contents( $url, false, $ctx );

And I get this error:

[2019-07-31 07:34:20][INFO] -> VERBOSE: ON [2019-07-31 07:34:21][INFO] -> CFStreamContext 1. handle checked and validated as protected. [2019-07-31 07:34:21][INFO] -> CFStreamContext 2. got cloudflare handle. [2019-07-31 07:34:21][INFO] -> CFStreamContext 3.1. (try: 0 first_attempt: 1) uam page requested with new cURL handle. request headers: accept: */* host: alta-definizione.mobi user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36 cookie: __cfduid=d63987887e1738ec8298a752bb86412d51564558461; response headers: HTTP/1.1 503 Service Temporarily Unavailable Date: Wed, 31 Jul 2019 07:34:21 GMT Content-Type: text/html; charset=UTF-8 Connection: close X-Frame-Options: SAMEORIGIN Cache-Control: no-cache Server: cloudflare CF-RAY: 4fede3af494c5e26-BNA [2019-07-31 07:34:21][INFO] -> CFStreamContext 3.2. (try: 0 first_attempt: 1) __cfduid cookie is: Name=__cfduid; Value=d63987887e1738ec8298a752bb86412d51564558461; [2019-07-31 07:34:26][INFO] -> CFBypass 1. Waiting for 4 seconds... [2019-07-31 07:34:26][INFO] -> CFBypass 2. Fetching parameters... [2019-07-31 07:34:26][INFO] -> s: 0fc875a045aa072b2d8663ebc0dd624ab400a97b-1564558461-1800-AQeTm/NCUePE+HtuV8qNaJ5ZbT6QKqBD2t/DAGQidnZtaZWj4y5HL1T5ynhLwiN/c9N7RXOG4RT0jC/4jgGgEPyU5/qOzquT50jWtL9M7+wdueMjBnPaRnhCENySk58df9Y74rPhljMgKIcrHPmnAlpSjI+pU1zaj9FLGHK9JJM5Ee8By3y2jtrf0RlOk9dH9A== [2019-07-31 07:34:26][INFO] -> jschl_vc: ee7902561b309433dff55fe5781dc365 [2019-07-31 07:34:26][INFO] -> pass: 1564558465.323-/GZF0YSm0u

Any help?

KyranRana commented 5 years ago

Try the new version v3.0.0

PHP 7.3 is required