CGI Development

Moderators: Jonathan
Number of threads: 57
Number of posts: 124

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Displaying a remote IP address Posted by terabyte on 27 Nov 2001 at 9:04 PM
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

Report
Re: Displaying a remote IP address Posted by hhco on 27 Nov 2001 at 11:12 PM
: 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'}\n";
if you are using Perl of course

Report
Re: Displaying a remote IP address Posted by Amante on 16 Jan 2002 at 9:30 AM
Hi,

Do you know which other ENV vribales do i have?

except
REMOTE_ADDR and QUERY_STRING ?

Thanks
Report
Re: Displaying a remote IP address Posted by Dazed66 on 23 Jan 2002 at 1:16 PM
: 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.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.