Howdy, Stranger!

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

Categories

Get Remote Host - Perl Net DNS

AndersideAnderside Member Posts: 7
Hi Friends

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

Thanks in Advance

Anderson

Comments

  • bgibbybgibby Member Posts: 251
    : 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:)
  • JonathanJonathan Member Posts: 2,914
    :
    : 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... ;-)

  • AndersideAnderside Member Posts: 7
    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... ;-)
    :
    :

  • JonathanJonathan Member Posts: 2,914
    : 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... ;-)

  • Andre YoungAndre Young USAMember Posts: 0

    [ http://forcoder.org ] free ebooks and video tutorials about || C#, Scratch, MATLAB, PHP, C++, Visual Basic .NET, Swift, Python, JavaScript, Delphi, R, C, Visual Basic, Java, Objective-C, Assembly, Ruby, Perl, PL/SQL, Go F#, Transact-SQL, D, FoxPro, Rust, LabVIEW, Awk, Logo, Ada, Lua, Hack, Kotlin, Alice, ML, VBScript, Erlang, Apex, Lisp, Bash, Crystal, Prolog, COBOL, Scheme, Julia, Clojure, ABAP, Fortran, Dart, Scala, SAS || ______________

Sign In or Register to comment.