Hi all,
I need to know how to get the URI from a remote script that redirects the page from the origional link.
eg. http://www.domainname.com/?redirectid=117 gets sent to http://www.domainname.com/some_directory/
In my browser i can find out what the actual redirected path is, I can run other scripts such as the w3c validator and it tells me, I just have no idea how to do it in php.
Can anyone help?
echo $_SERVER['HTTP_REFERER'];
Yes; it's spelled wrong, and that is how it's done...note that it's can't necessarily be trusted, however.
trouble is it's a remote file, i'm using fopen("http://www.domainname.com.au/?redirectid=117","r"); to open the file.
the remote script redirects the handeler to a new page which i'm not able to prior to running fopen. that redirected uri is what i need.
I'm looking at apache_lookup_uri but the documentation on it sucks!