Finding the URL of a redirected page
Posted: Sun Apr 16, 2006 10:38 am
I'm writing a program that will take a series of URLs and, one at a time, examine the source code of the target pages.
So far so good. It all works as expected, except for when one of the URLs is a redirect page. In those cases my script sees the source code of the page that is doing the redirecting, but not the source code of the final destination.
Can anyone suggest a way that I can get my php to 'see' the actual destination page, or at least report what its URL would be.
As the 'real' page will render client side, I suspect that javascript may be the answer, but can't get my brain round a method to do what I need.
Thanks - I hope!
Martin
So far so good. It all works as expected, except for when one of the URLs is a redirect page. In those cases my script sees the source code of the page that is doing the redirecting, but not the source code of the final destination.
Can anyone suggest a way that I can get my php to 'see' the actual destination page, or at least report what its URL would be.
As the 'real' page will render client side, I suspect that javascript may be the answer, but can't get my brain round a method to do what I need.
Thanks - I hope!
Martin