Displaying a remote IP address - Programmers Heaven

Howdy, Stranger!

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

Categories

Displaying a remote IP address

Can somebody help me with the correct syntax for displaying a remote ip address on a HTML page using $ENV{'REMOTE_ADDR"}

Any help is greatly appreciated.
Thank you

Comments

  • hhcohhco Posts: 7Member
    : Can somebody help me with the correct syntax for displaying a remote ip address on a HTML page using $ENV{'REMOTE_ADDR"}
    :
    : Any help is greatly appreciated.
    : Thank you
    :
    :
    print "Your IP is: $ENV{'REMOTE_ADDR'}
    ";
    if you are using Perl of course :-)

  • AmanteAmante Posts: 52Member
    Hi,

    Do you know which other ENV vribales do i have?

    except
    REMOTE_ADDR and QUERY_STRING ?

    Thanks
  • Dazed66Dazed66 Posts: 77Member
    : Hi,
    :
    : Do you know which other ENV vribales do i have?
    :
    : except
    : REMOTE_ADDR and QUERY_STRING ?
    :
    : Thanks
    :

    GATEWAY_INTERFACE - Describes the version of CGI protocol

    SERVER_PROTOCOL - Describes the version of HTTP protocol

    REQUEST_METHOD - Either GET or POST

    PATH_INFO - Data appended to a URL after a slash.

    PATH_TRANSLATED - The complete path of PATH_INFO

    QUERY_STRING - Contains input data if using the GET method.

    CONTENT_LENGTH - Stores the length of the input if you are
    using the POST method.

    SERVER_SOFTWARE - Name and version of the server software.

    SERVER_NAME - Host name of the machine running the server.

    SERVER_ADMIN - E-mail address of the Web server admin.

    SERVER_PORT - Port on which the server is running - usually 80.

    SCRIPT_NAME - The name of the CGI Program.

    DOCUMENT_ROOT - The value of the document root on the server.

    REMOTE_HOST - Name of the client machine requesting or sending
    information.

    REMOTE_ADDR - IP address of the client machine connected to the
    server.

    REMOTE_USER - The username if the user has been authenticated.

    REMOTE_GROUP - The group name if the user belonging to the group
    has been authenticated.

    AUTH_TYPE - Defines the authorization scheme being used.

    REMOTE_IDENT - Displays the username if the person running the
    client connected to the server.

    These came from a dated book so i don't know if all of them still work.
Sign In or Register to comment.