Reputation: 13
I'm trying to retrieve data from a publicly accessible website that is built on ASP.net sessions. When I send standard browser 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?
Upvotes: 1
Views: 394
Reputation: 4023
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.
Upvotes: 2