PDA

View Full Version : Using ="$ENV{'REMOTE_HOST'}"


ivy
05-07-2003, 01:30 AM
Hi there

I have a stat counter on my web site (courtesy of www.htmlite.com) and I am trying to add IP address and the visitors host name to the stats. I have added the IP address successfully, using REMOTE_ADDR but I would also like the host name which I believe should be:

="$ENV{'REMOTE_HOST'}";

The idea, is that I get results like this:

(IP ADDRESS) 195.92.194.18
(HOST NAME) webcacheM08b.cache.pol.co.uk

BUT.. The host name is not being picked up by my stat counter, but is being picked up by other stat counters (i.e. another one that I have registered with www.statcounter.com)

What could I possibly be doing wrong?

Help would be really appreciated.

YUPAPA
05-07-2003, 02:00 AM
It should work if both scripts uses $ENV{'REMOTE_HOST'}
Are you running the script from the same virtualhost? If it is not, it could be you have hostname lookups turned off for apache. :confused:

ivy
05-07-2003, 11:32 AM
Hi YUPAPA

Thank you for getting back. Both envs are on the same cgi script and therefore on the same host.

Just cheked the log and it is giving IP addreses but not host names!

I'll contact my server and see whether they have this feature turned off!