KyranRana / cloudflare-bypass

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

In the v2 CURL example, what does the 'cache' parameter do? #66

Closed skibulk closed 6 years ago

skibulk commented 6 years ago

Does it only save the clearance token for later use, or does it also cause Cloudflare to cache the request? I'm writing an app in which I want to use CURL to preload the cache on Cloudflare (UAM is off). For some reason, Cloudflare won't cache my CURL requests.

$curl_cf_wrapper = new CFCurl(array(
    'cache'         => true,   // Caching now enabled by default; stores clearance tokens in Cache folder
));
KyranRana commented 6 years ago

The script caches the clearance tokens into the directory specified in cache_path (or the system temp directory).

The file which it caches cookies in is md5( hostname of site ).txt

skibulk commented 6 years ago

Thanks for clarifying.