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? Link to comment https://forums.phpfreaks.com/topic/280053-getting-results-of-second-page/ Share on other sites More sharing options...
requinix Posted July 11, 2013 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. Link to comment https://forums.phpfreaks.com/topic/280053-getting-results-of-second-page/#findComment-1440257 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.