KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
The curl_getinfo function returns a lot of metadata about the result of an HTTP request. However, for some reason it doesn't include the bit of information I want at the moment, which is the target URL if the request returns an HTTP redirection code. I'm not using CURLOPT_FOLLOWLOCATION because I want to handle specific redirect codes as special cases. If cURL can follow redirects, why can't it tell me what they redirect to when it isn't following them? Of course, I could set the CURLOPT_HEADER flag and pick out the Location header. But is there a more efficient way?
Tags (comma-separated)
Save Edits
Cancel