Closed curla92 closed 5 years ago
When initialising CFCurl
or CFStreamContext
, set the cache
property to true and cache_path
to the directory you want the clearance cookie you want to be stored in. Once you have done this, trigger the CF Bypass process and there should be a file in that directory with the CF clearance token for the CF site you accessed.
The file name should be called md5( site hostname ).txt
i added these lines….
curl_setopt($ch, CURLOPT_COOKIEJAR, COOKIE_FILE_PATH); curl_setopt($ch, CURLOPT_COOKIEFILE, COOKIE_FILE_PATH);
is it ok? thank y
Il giorno 29 set 2018, alle ore 12:19, Kyran Rana notifications@github.com<mailto:notifications@github.com> ha scritto:
cache_path
Try this:
$curl_cf_wrapper = new CFCurl(array(
'cache' => true, // Caching now enabled by default; stores clearance tokens in Cache folder
'max_retries' => 5, // Max attempts to try and get CF clearance
'cache_path' => COOKIE_FILE_PATH // Where to cache session/clearance tokens.
));
i would to add cf clearance cookie with v2 example. thank y