A URL redirects to another link. How do I know which link it gets redirected to with PHP and JS? And is finding the filesize of the new link possible too, without complete transfer of the file? Thanks in advance.
A:
the redirect is either a header or a meta tag. if it's a header, great; if it's a meta tag, you're screwed without a parser.
as for the file size, that might be in the header of the new file, but not necessarily.
you need to clarify your question. what exactly do you want?
sreservoir
2010-04-29 00:36:55
It's a "HTTP/1.1 303 See Other".Copied from Live HTTP Headers and pasted here: http://pastebin.com/4QJR74VK
2010-04-29 04:59:04
Thanks for your help.
2010-04-29 04:59:25
Content-Length: 1120955
sreservoir
2010-04-30 19:36:02
ya, got it from Live HTTP Headers but how do i get it from either JS or PHP?
2010-05-02 08:29:03
fetch it and read up to \n\n. if it's there, take it. if not, no information.
sreservoir
2010-05-03 01:09:26
how do i fetch it with PHP and JS, that's where I am stuck
2010-05-08 09:54:10