Hello All,
I am trying extract the final url from a series of redirects (including some JavaScript redirects). I am bale to handle normal redirects by using the response code. I am struck with the JavaScript redirects as I am not able to extract the redirect url. Can you please let me know if there is any way to get the redirect urls from javascript redirects? (I am using a advertisement url as test case which redirects to different content providers some of them are javascript redirects)
-Thanks in advance
finding the redirect url from a java script redirect
Moderator: General Moderators
- andyhoneycutt
- Forum Contributor
- Posts: 468
- Joined: Wed Aug 27, 2008 10:02 am
- Location: Idaho Falls
Re: finding the redirect url from a java script redirect
Are you parsing this out of a file/stream or are you actually trying to follow the redirects using something like cURL?
-Andy
-Andy
Re: finding the redirect url from a java script redirect
I am using the PEAR package HTTP request to get the headers and body of a http request and parse the body for the redirect urls (or use the header location field for http respose codes > 300 & <399).
Thanks
Thanks
- andyhoneycutt
- Forum Contributor
- Posts: 468
- Joined: Wed Aug 27, 2008 10:02 am
- Location: Idaho Falls
Re: finding the redirect url from a java script redirect
Would you mind posting some code so I can play around with the problem from my end?