Impersonating an ASP.net session with PHP
I'm trying to retrieve data from a publicly accessible website that is built on ASP.net sessions. When I send standard browse开发者_StackOverflowr headers with PHP curl, I keep getting the error that the session has expired. How can I impersonate a session with curl or some other PHP function?
curl_septopt
Using the CURLOPT_COOKIEJAR and CURLOPT_COOKIEFILE allows you to capture and re-use the site's cookies to manipulate the session. Check the doc page for more info.
精彩评论