$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "http://www.test.com/page1",
));
curl_setopt_array($curl, array(
CURLOPT_URL => "http://www.test.com/page2",
));
curl_close($curl);
as in the above code, use the same $curl instance to send multiple requests. First, visit http://www.test.com/page1. Will the server return cookie, and then will not automatically bring the cookie returned by the server when visiting http://www.test.com/page2?
the actual measurement does not take the cookie, verification of the previous request.
that is, even if it is the same curl instance, the cookie requested each time is isolated (separate)?
A solution has been found: http://php.net/manual/zh/func.