|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
|
|
#1
|
|||
|
|||
|
Hi
On my apache 1.3.12, sometimes $REMOTE_HOST works, sometimes it does not work. Is there a bug in apache 1.3.12? |
|
#2
|
|||
|
|||
|
It's not a bug. It's just that some IPs might take longer to be looked up or the server is too busy.
The following Perl code should help a bit: $ip = $ENV{'REMOTE_ADDR'}; $n = `nslookup $ip | grep Name`; chop($n); $host = substr($n, rindex($n, " ")+1); if ($host eq "") { $host=$ENV{'REMOTE_ADDR'}; } $host should be the value of REMOTE_HOST, if not, it's then the REMOTE_ADDR. |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > remote host |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|