Re: Identifying hostname
| From: | friedhelm betz | Date: | Fri, 07 Jul 2000 10:32:29 +0000 |
| Subject: | Re: Identifying hostname | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-933@lists.php.net to get a copy of this message | ||
Joseph WENNINGER wrote:
> 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
>
> Kind Regards
> Joseph Wenninger
> j.wenninger@austroschrift.at
>
dear Joseph,
the right function is getenv ("environment variable"). for details have a
look at the phpmanual : function.getenv.html.
for your idea with the following statement you may got what you want:
$adress = getenv ("REMOTE_HOST");
for further details on environment variables try the function phpinfo () and
look at environment or point your browser to (for a full list):
http://hoohoo.ncsa.uiuc.edu/cgi/env.html
i myself tried this under php4pl2, nts and apache; NOT working with the
isapi filter for IIS 4 (don´t know about the cgi-method on iis4).
hope this helps
friedhelm