Solved

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

Posted on 1997-06-25
3
287 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
If you get a (Blue Screen of Death), your system writes a small file called a minidump. Your first step is to make certain your computer is setup to record memory dumps. Right click My Computer, choose properties. Click on the advanced tab, an…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

770 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