Page 1 of 1

Mr. server url

Posted: Wed Aug 14, 2002 4:24 pm
by cheatboy00
o.k. I'm trying to get the server part of the url, of where the person is.... and if its something then include a file...

I know about $PHP_SELF gets you the folder and the file... but i duno how to get the server....

Code: Select all

$url = ""; // the server

// note the url below is not real and just an example
if ($url == "http://sub.wordopen.com/") {
} else {
   include ("stop.php");
}
um... also note that the file thats going to contain this code is in a frame... so it has to get the top url, not the current frame url.

Posted: Wed Aug 14, 2002 5:03 pm
by RandomEngy
$_SERVER['HTTP_HOST']

Posted: Wed Aug 14, 2002 8:19 pm
by cheatboy00
sweet.... thanks a bunch.