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

From: Date: Sat, 20 Jul 2002 22:20:40 +0000
Subject: RE: [PHP] 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-108679@lists.php.net to get a copy of this message
For clarification, did you even try $_SERVER['HTTP_HOST'] like it was suggested? ---John Holmes... > -----Original Message----- > From: Police Trainee [mailto:policetrainee@yahoo.com] > Sent: Saturday, July 20, 2002 5:04 PM > To: PHP > Subject: [PHP] CLARIFICATION: how do i get the domain that the script is > called from? > > 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 > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#108679) next »