Re: Identifying hostname
| From: | Datahntr | Date: | Fri, 07 Jul 2000 21:10:25 +0000 |
| Subject: | Re: Identifying hostname | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-947@lists.php.net to get a copy of this message | ||
""Joseph WENNINGER"" <j.wenninger@austroschrift.at> wrote in message
news:8k47pt$v4a$1@toye.php.net...
> How can I determine the hostname of a user accessing a php-driven website.
> I want to decide by the hostname which page the customer gets to see
>
You can just use $REMOTE_HOST (as opposed to the getenv option, which also
works, but is longer), which is not guaranteed to be set. $REMOTE_ADDR is
the IP address of the user, which is always set, and thus a bit more
reliable.
--
O.