If I have a URL (eg. http://www.foo.com/alink.pl?page=2), I want to determine if I am being redirected to another link. I'd also like to know the final URL (eg. http://www.foo.com/other_link.pl). I want to know how to do that in PHPThank you all for your help (more information:I want to have a function that is called doesItDirect($url) which returns the url which it redirects to if true, and it returns the same url passed if false)