On Tue, Sep 16, 2008 at 11:40 PM, Micah Gersten <[EMAIL PROTECTED]> wrote:
> Wouldn't it be nice if in the $_SERVER array you could get the whole URL
> now that PHP has a parse_url function?

That actually would be a nice thing to have, instead of having to
build it yourself (considering people do it a variety of ways)

Although I think this would sum it up quite briefly:

$url = 'http';
if(isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on')
{ $url .= 's'; }
$url .= '//'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];

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

Reply via email to