Can someone explain CURL cookie handling (PHP)?
honestly I'm having some trouble understanding the CURL options CURLOPT_COOKIEFILE and CURLOPT_COOKIEJAR.
If I set
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie.txt')
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt')
Where is cookie.txt created? On the server? In which directory?
And the most stupid question: does this handle all requests the curl-script is executing? So, if I have 200 requests, does CURL store all the request cookie information in a single file for alle 200 requests?
Maybe someone can give me quick overview how this works, I didn't find a good tutorial on this and the documentati开发者_C百科on is quite poor.
cookie.txt is on the same directory as your PHP script. cookie.txt is overwritten for every new curl handle.
精彩评论