----- Original Message -----
From: "McShen" <[EMAIL PROTECTED]>


>
> 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


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to