Find the answer to your Linux question:
Results 1 to 2 of 2
With php, our server will capture remote nodes IP addresses like this: <?php echo $REMOTE_IPADDR; ?> But, does anyone know what the newest variables are to capture remote_host, remote_addr, etc...? ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2003
    Location
    Seattle
    Posts
    37

    Info on capturing remote node's address...


    With php, our server will capture remote nodes IP addresses like this:
    <?php

    echo $REMOTE_IPADDR;

    ?>

    But, does anyone know what the newest variables are to capture remote_host, remote_addr, etc...?

    I tried the following from a book dated 5 years ago and well, you know how fast the technology stuff changes:

    $remote_address = $ENV('REMOTE_ADDR');
    $remote_host = $ENV('REMOTE_HOST');

    print "IP is: ",$remote_address,"\n";

    and the error message I'm receiving is:

    Error message:
    Global symbol "$remote_address" requires explicit package name

    Anyone know of a simpler way to capture the ip address and host name?

    Thanks.

  2. #2
    Linux Engineer
    Join Date
    Apr 2003
    Location
    Sweden
    Posts
    796
    I have answered you other post...try to post only one post per subject the next time..
    Regards

    Andutt

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •