Page 1 of 1

SNOOPY when URL is Redirected

Posted: Sat Apr 17, 2004 2:04 pm
by chvol
I am writing a program in PHP that accesses the HTML of a given URL via class SNOOPY. However, some URLs change into another one e.g. http://www.247paintball.com becomes http://www.247paintball.com/forum/index.php if you connect to it. How can I tell that this URL changes like that? I think it is called “redirecting”. Is it in the HTML? I need to know what the new URL is in order to translate HREF= into the complete URL. Charlie chvol@aol.com

Posted: Sat Apr 17, 2004 2:48 pm
by JAM
You could play around with $_SERVER['REQUEST_URI'] abit.

Posted: Sat Apr 17, 2004 3:14 pm
by Ixplodestuff8
On the page that does the redirecting there is this line:

<meta http-equiv="Refresh" content="0; URL=forum/index.php">

What you could do is have your class find <meta> tags with the http-equiv="Refresh" and extract the redirect url.