Re: Client Host Name
| From: | Rasmus Lerdorf | Date: | Mon, 07 Aug 2000 04:29:44 +0000 |
| Subject: | Re: Client Host Name | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-10403@lists.php.net to get a copy of this message | ||
He was asking for the client hostname, not the server's. Generally you
will have to look up the client hostname from the ip.
ie. echo gethostbyaddr($REMOTE_ADDR);
-Rasmus
On Mon, 7 Aug 2000, Brian Clark wrote:
> Marcio Endo wrote:
>
> >Hello everyone,
> >
> >How do I get the client hostname from PHP? Or is it even possible?
> >
> >It seems like HTTP_ENV_VARS["REMOTEHOST"] returns only the IP address of the
> >client.
>
> Try $GLOBALS['HTTP_HOST']
>
> Brian
>
>
>