Answer the question
In order to leave comments, you need to log in
How to pass cookies in the second request?
There is a parser that passes authorization through the curl_setopt parameter and writes a cookie file to the server. How to pass these cookies to further parser requests? (in order to parse already logged in, I won't parse the login page...)
It would be great if you could attach an example to the answer...
Answer the question
In order to leave comments, you need to log in
All parser requests (or rather, cUrl initializations) must have options, and it will write / read cookies itself.
curl_setopt($ch, CURLOPT_COOKIEFILE, "cookie.txt"); // Из какого файла читать
curl_setopt($ch, CURLOPT_COOKIEJAR, "cookie.txt"); // В какой файл записывать
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question