CLARIFICATION: how do i get the domain that the script is called from?

From: Date: Sat, 20 Jul 2002 21:03:58 +0000
Subject: CLARIFICATION: 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-108677@lists.php.net to get a copy of this message
for clarification, what I am trying to be able to do is determine whether the user entered "http://www.xyz.com/abc.php" to get to the script or if they entered "http://12.24.48.96/abc.php" to get to the script. Thanks > 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

« previous php.general (#108677) next »