LPM: Re: getting ips
David Pitts
dpitts at mk.net
Mon Mar 19 13:38:44 CST 2001
Your remote (client) ip is passed as an environment variable called
REMOTE_ADDR as in the following script:
=================================
#!/usr/bin/perl
print "Content-Type: Text/HTML\n\n";
print "The remote address is: $ENV{REMOTE_ADDR}";
==================================
To get a list of all your environment variables, try this:
==================================
#!/usr/bin/perl
print "Content-Type: Text/HTML\n\n";
foreach (sort keys %ENV) {
print "$_ has value $ENV{$_}<br>\n";
}
==================================
Thanks,
David Pitts
http://www.dpitts.com
----- Original Message -----
From: "Ronald Edward Petty" <repett0 at sweb.uky.edu>
To: <lexington-pm-list at happyfunball.pm.org>
Sent: Monday, March 19, 2001 2:12 PM
Subject: LPM: getting ips
>
> anyone have a script to show how to get a visitor ip for netscape and ie?
> I can't seem to get one for both to work...
> ron
>
>
More information about the Lexington-pm
mailing list