Re: Capture the whole URL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,
       URL consist of two part HOST and URI respectivetely. HOST part likes 
example www.domain.com . URI part likes main.php?id=5 and so on. You can get 
the HOST part of URL with $HTTP_HOST and URI part of URL with 
$REQUEST_URI.:)


-- 
Haydar TUNA
Republic Of Turkey - Ministry of National Education
Education Technology Department Ankara / TURKEY
Web: http://www.haydartuna.net


""Ken Kixmoeller -- reply to ken@xxxxxxxxxxxxxx"" <Kixjaguar@xxxxxxxxxxx> 
wrote in message news:31A2B65D-A2F2-49E6-891C-745E96B76EF8@xxxxxxxxxxxxxx
> Hey - -
>
> I must be missing something, but in a URL such as:
>
>   diddly.com?id=fred&total=goof
>
> $_SERVER['PHP-SELF'] gives me the diddley.com part.
>
> I want to capture the whole URL. The documentation makes it seem like 
> $_SERVER['REQUEST_URI'] is supposed to do that, but I get an  "Undefined 
> Index" error.
>
> Do I have to enable this somehow? I realize that I could recreate the 
> rest of the URL from $_GET's, but I'd rather not if I don't have to.
>
> PHP 5.1
>
> Ken 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux