Set-Cookie:
header) to be stored in the client, and are then supposed to get sent back again in requests that matches the host and path requirements that were specified along with the cookie when it came from the server (using the Cookie:
header). On the modern web of today, sites are known to sometimes use large numbers of cookies.CURLOPT_COOKIEFILE
option:CURLOPT_COOKIEJAR
option:curl_easy_cleanup()
, all known cookies will be written to the given file. The file format is the well-known "Netscape cookie file" format that browsers also once used.NAME=VALUE;
- including the semicolon separator.CURLOPT_COOKIELIST
with a new cookie. The format of the input is a single line in the cookie file format, or formatted as a Set-Cookie:
response header, but we recommend the cookie file style:curl_slist_free_all
when the application is done with the information.CURLOPT_COOKIEJAR
:CURLOPT_COOKIEFILE
:#
are treated as comments.