Solved

$ENV{'REMOTE_HOST'} is not availible in IIS.

Posted on 1997-06-25
3
283 Views
Last Modified: 2013-12-25
When I try to get $ENV{'REMOTE_HOST'} in my Perl-script it only returns the IP-address. Why? I use Internet Information Server. Is it some kind of setting needed to enable the DNS lookup?
0
Comment
Question by:Martin
3 Comments
 
LVL 1

Expert Comment

by:ian010997
ID: 1828566
Yes, if your http server is not set up to do the logical
name lookup for you, then you will receive the IP address.
Or if it cannot give you the logical name, then it could
also give you the IP address.  I like to just use the
REMOTE_ADDR and do the lookup myself in my code when needed,
since it makes the http server faster if it doesn't have
do the lookup on the logical address for every page served.
0
 

Author Comment

by:Martin
ID: 1828567
I wanted to know how I turned this setting on!
0
 
LVL 28

Accepted Solution

by:
sybe earned 100 total points
ID: 1828568
Try this in Perl

$RemoteHost = (gethostbyaddr(inet_aton($ENV{'REMOTE_HOST'}), AF_INET))[0];

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now