RE: [PHP] how do i get the domain that the script is called from?

From: Date: Sat, 20 Jul 2002 20:04:35 +0000
Subject: RE: [PHP] how do i get the domain that the script is called from?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-108675@lists.php.net to get a copy of this message
Look at $_SERVER['HTTP_HOST'] for the www.thesite.com version and $_SERVER['LOCAL_ADDR'] for the IP Matt Babineau MCWD / CCFD ----------------------------------------- e: matt@criticalcode.com p: 603.943.4237 w: http://www.criticalcode.com PO BOX 601 Manchester, NH 03105 -----Original Message----- From: Police Trainee [mailto:policetrainee@yahoo.com] Sent: Saturday, July 20, 2002 3:56 PM To: PHP Subject: [PHP] how do i get the domain that the script is called from? Script ABC.php is located at http://www.xyz.com/ABC.php echo $SCRIPT_NAME would return ABC.php echo $SOMETHING_HERE should return xyz.com or www.xyz.com --> What should be in the $SOMETHING_HERE spot? I need this to also work with something such as http://12.24.48.96/ABC.php where echo $SOMETHING_HERE would return 12.24.48.96 thanks __________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#108675) next »