MySQL_Narb Posted July 11, 2013 Share Posted July 11, 2013 curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $page = curl_exec($ch); As you can see, I want CURL to follow any redirects a website throws at me. And I want $page to contain the HTML of the last page loaded; however, $page seems to give me the value of just the very first page and none of the following redirects. Is there anyway I can go about this differently to solve my problem? Quote Link to comment Share on other sites More sharing options...
Solution requinix Posted July 11, 2013 Solution Share Posted July 11, 2013 FOLLOWLOCATION only works with the Location: HTTP response header. If the pages are redirecting via Javascript or a META refresh or some other mechanism then cURL won't know about it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.