Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old April 19th, 2001, 10:43 AM
cindy_lens cindy_lens is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Posts: 28 cindy_lens User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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?

Reply With Quote
  #2  
Old April 22nd, 2001, 08:09 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > remote host


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway