How can I get a 302 redirection URL's Location header in PHP?
Posted
by QAH
on Stack Overflow
See other posts from Stack Overflow
or by QAH
Published on 2010-04-13T23:17:06Z
Indexed on
2010/04/13
23:23 UTC
Read the original article
Hit count: 546
I am trying to find a universal way to expand most if not all of the shortened URLs out there. I know short URLs such as bit.ly, TinyURL, goo.gl, etc use the 302 redirection method to redirect you to another site. How can I make a HEAD request to the shortened URL in php and get the "Location" part of the header?
Please help me with this.
Thanks
© Stack Overflow or respective owner