RE: [PHP] Client Host Name
| From: | Krznaric Michael | Date: | Tue, 08 Aug 2000 13:29:31 +0000 |
| Subject: | RE: [PHP] Client Host Name | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-10657@lists.php.net to get a copy of this message | ||
Hi,
I run apache 1.3.12 on Solaris 7 with php 4.0.0. Since you are on
the topic maybe you have some ideas about my question. I am in a controlled
intranet environment, all our users use NT and our intranet is hosted on the
UNIX box. Is there a way to get the WINS host name from the php script or
UNIX in general for that matter?
Mike
-----Original Message-----
From: Rasmus Lerdorf [mailto:rasmus@linuxcare.com]
Sent: Monday, August 07, 2000 12:30 AM
To: Brian Clark
Cc: Marcio Endo; php-general@lists.php.net
Subject: Re: [PHP] Client Host Name
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
>
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net