PDA

View Full Version : cURL



seandy
09-19-2008, 03:30 AM
Hello all,
I'm using php cURL to login another website.
It seems cURL can't make/use COOKIES.

Here's some codes :
curl_setopt($ch,CURLOPT_COOKIESESSION,true);
curl_setopt($ch, CURLOPT_COOKIEJAR, "cookie.txt");
curl_setopt($ch, CURLOPT_COOKIEFILE, "cookie.txt");

Please give me a solution for this.

FYI : i've triend on another hosting, it works perfectly.

Thank you
best regards
andy :D

alemcherry
10-04-2008, 09:47 AM
Note sure how the curl cookie function works, but my assumption - it could be a permission issue. Try giving write permission to cookie.txt file.

kiddo
03-04-2009, 12:57 PM
My curl scripts that use cookies stopped working on both bluehost and hostmonster a few days ago after working fine for a very long time.

I can see that data is being written to the cookie file, but it seems it can't be read even when I chmod the cookie file to 777.

As above, the same scripts work fine on other hosts.