Re: tracking the current url

From: Date: Fri, 09 Feb 2001 23:11:52 +0000
Subject: Re: tracking the current url
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-39036@lists.php.net to get a copy of this message
----- Original Message ----- From: "McShen" <webmaster@celebritieszones.com> > > hi > > Can you tell me how to track the current url by using PHP? for example, > Mike is visiting http://www.celebritieszones.com/showthumb/britney_spears/1/ > and i wanna make a PHP script so it tells Mike that he is currently browing > http://www.celebritieszones.com/showthumb/britney_spears/1/ > > I tried to use > > $url_array=explode("\",$REQUEST_URI); > > But it didn't work. It showed Array instead of the URL when i tried to > display it. > Of course, trying to print $url_array will print "Array". You just turned the $REQUEST_URI string into an array (that being what explode does). If you want Mike to know the name of the file he's on, print $PHP_SELF. The info the location bar (not counting the root domain name)? print $REQUEST_URI. The domain name? $HTTP_HOST http://www.php.net/manual/en/html/language.variables.predefined.html Anna

« previous php.general (#39036) next »