RE: [PHP] Request domain name
| From: | James Nunnerley | Date: | Wed, 25 Feb 2004 14:22:25 +0000 |
| Subject: | RE: [PHP] Request domain name | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-178837@lists.php.net to get a copy of this message | ||
$_SERVER["HTTP_HOST"] will get you the full domain name...
Nunners
-----Original Message-----
From: Age Bosma [mailto:agebosma@home.nl]
Sent: 25 February 2004 14:13
To: php-general@lists.php.net
Subject: [PHP] Request domain name
I would like to be able to request the domain name.
How can this be achieved without hardcoding it?
$_SERVER['REQUEST_URI'] doesn't provide me the domain name, it just
provides me "/index.php?page=2000" instead of e.g.
"www.blaat.com/index.php?page=2000"
I can't seem to find anything on the php site to get the domain name as
well.
I prefer using absolute URI's.
The reason why this is a problem for me is besause I'm working on a site
which has two different URI's but both display the exact same site.
Cheers,
Age Bosma
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php