cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Question on cookies

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 6 Aug 2006 22:33:32 +0200 (CEST)

On Sat, 5 Aug 2006, Frme wrote:

> I save the cookie using the "CURLOPT_COOKIEJAR" option in curl_easy_setopt
> function, as filename I pass the name of file I created before, so may I
> assume that once I created such file and have requested the server for the
> 1st time, in my next requests with different CURL objects but with the same
> cookie file, this file will be read and the saved in it cookie will be
> correctly sent with my next requests?

Note exactly. CURLOPT_COOKIEJAR is for writing/saving cookies to a given file,
but if you want libcurl to read cookies from this (or another) file, you need
to use use CURLOPT_COOKIEFILE.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2006-08-06