I was able to use How To Get Redirect URL In PHP
but now it does not work anymore. site where I try to get redirect url is using temporary 302 redirection.
It gives me “05 Request method ‘HEAD’ not supported”
Only way for me to see “link” if I put get_headers in my script, I will get bunch of stuff and I see redirect displayed in “[Cache-Control] => private [Location] => http://www.test.com” towards end.
How do I modify above script to work with this new 302 redirect?
Thanks
If the server doesn’t support
HEAD, you could retry withGET. Make sure that if you do this you only search for theLocationheader in the headers (not in the body).