curl - CURLOPT_COOKIEJAR and cookie file -


i'm using curlopt_cookiejar (curl libraries ), , i’m saving cookies in file, "cookie.txt". can't find file. it? searched in project folder, nothing.

here code:

curl_easy_setopt(handle,curlopt_cookiesession,1);       // clean session. curl_easy_setopt(handle,curlopt_cookiejar,"cookie.txt"); curl_easy_setopt(handle,curlopt_useragent,useragentmozilla);        // set user agent curl_easy_setopt(handle,curlopt_url,lien.toutf8().constdata());     // set url  curl_easy_setopt(handle,curlopt_postfieldsize,data.size()+4);     // size of request. curl_easy_setopt(handle,curlopt_postfields,ba);  // aray of post request res = curl_easy_perform(handle);   

of course have .

you can try code :

curlopt_cookiejar=>__dir__."/cookie.txt", 

or

curlopt_cookiejar=>dirname(__file__)."/cookie.txt", 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -