Page 1 of 1

URL in a string

Posted: Tue Jun 17, 2003 2:21 pm
by nmotion
Can find this anywhere...

I have different domain names on the same server. How do I detect which url is being used to see the page.

Posted: Tue Jun 17, 2003 3:08 pm
by bjg
$_SERVER['HTTP_HOST']

Posted: Wed Jun 18, 2003 4:11 am
by twigletmac
You can find lots of useful things by doing:

Code: Select all

echo '<pre>';
print_r($_SERVER);
echo '</pre>';
Mac

Posted: Wed Jun 18, 2003 5:24 am
by cactus
Additionally, the use of phpinfo() to determine the superglobals elements is recommended, but may be disabled on some shared hosting systems :(

Regards,