There's a page that I want to crawl but the page is a redirect to another website.
I would like to get the URL of that other website automatically.
Say, page is http://www.domain1.com/redirect.php and it redirects to http://www.domain2.com/
Is there anyway to crawl http://www.domain1.com/redirect.php and get the url http://www.domain2.com/
I wonder that if you opened a connection using fsock... wouldn't the page automatically redirect? thus giving you access to the redirected page..
you can gain access to the redirected page. But, how do you grab the URL of that page?
Depends on how the redirect works... if it's an HTTP header redirect, use [man]get_headers/man.