Solved

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

Posted on 1997-06-25
3
299 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 to Create Failover DNS Record Sets in Route 53

Route 53 has the ability to easily configure DNS record sets specifically for failover scenarios. These failover record sets can be configured to failover to full-blown deployments in other regions or to a static HTML page that informs your customers of the issue.

Question has a verified solution.

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

This tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you mig…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

635 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