Get Remote Host - Perl Net DNS

Hi Friends

How can i get the visitor Remote Host in my site using PERL-NET-DNS Module ?

Thanks in Advance

Anderson

Comments

  • : Hi Friends
    :
    : How can i get the visitor Remote Host in my site using PERL-NET-DNS Module ?
    :
    : Thanks in Advance
    :
    : Anderson
    :

    Hi there,

    Sorry, but can't you use the $ENV{REMOTE_HOST} environment variable?

    Cya
    Bradley q:)
  • :
    : Hi there,
    :
    : Sorry, but can't you use the $ENV{REMOTE_HOST} environment variable?
    :
    : Cya
    : Bradley q:)
    :


    Yeah, that was my thought...alternatively, the problem may be that the server does not do the host lookups automatically. If this is the case, use the REMOTE_ADDR environment variable and then do this to turn an IP to a hostname:-

    @numbers = split(/./, $ipaddress);
    $ip_number = pack("C4", @numbers);
    $hostname = (gethostbyaddr($ip_number, 2))[0];

    Jonathan


    -------------------------------------------
    Count your downloads:
    http://www.downloadcounter.com/
    And host your site:
    http://www.incrahost.com/
    Don't say I never give you anything... ;-)

  • Hi

    Jonathan i am very thankful. My program is ok.

    A big hug from Brazil

    Anderson

    : :
    : : Hi there,
    : :
    : : Sorry, but can't you use the $ENV{REMOTE_HOST} environment variable?
    : :
    : : Cya
    : : Bradley q:)
    : :
    :
    :
    : Yeah, that was my thought...alternatively, the problem may be that the server does not do the host lookups automatically. If this is the case, use the REMOTE_ADDR environment variable and then do this to turn an IP to a hostname:-
    :
    : @numbers = split(/./, $ipaddress);
    : $ip_number = pack("C4", @numbers);
    : $hostname = (gethostbyaddr($ip_number, 2))[0];
    :
    : Jonathan
    :
    :
    : -------------------------------------------
    : Count your downloads:
    : http://www.downloadcounter.com/
    : And host your site:
    : http://www.incrahost.com/
    : Don't say I never give you anything... ;-)
    :
    :

  • : Hi
    :
    : Jonathan i am very thankful. My program is ok.
    :
    : A big hug from Brazil
    :
    : Anderson
    :

    Anderson,

    Happy to help! Greetings from England. :)

    All the best,

    Jonathan

    -------------------------------------------
    Count your downloads:
    http://www.downloadcounter.com/
    And host your site:
    http://www.incrahost.com/
    Don't say I never give you anything... ;-)

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories