Possible Duplicate:
How to get the real URL after file_get_contents if redirection happens?
I'm using file_get_contents('http://someurl.com/1893849')
to get contents of a url, but the url gets redirected. For example /1893849
ends up at /some-url-path
. Is there a way, in addition to getting the file contents, to also know the end path?