Prints user's IP address and localtime on the page





6
Date Submitted Thu. Aug. 10th, 2006 1:14 PM
Revision 1 of 1
Beginner sio2man
Tags CGI | Perl
Comments 1 comments
Prints the user's IP address and localtime on a web page.

#!/usr/bin/perl


#Logger
$time = localtime;
$ip = "$ENV{'REMOTE_ADDR'}";

open(OUT, ">>log.htm");
print OUT "Access from: $ip at $time<p>\n";
close(OUT);
 

Daryl Hoyt

Comments

Comments Use Access Logs?
Thu. Aug. 31st, 2006 7:48 AM    Scripter ctiggerf

Voting