I dont thing my ISP's News Server is working properly so I will thry it
from here.
I am trying to log the users IP via the web and nothing happens the date
nore the ip get there. Also if I put the append to the open statement I
get an error via the web also. This is the code. I got it to show up
via the web but it never gets to the file. Is there something I am
missing?
#!/usr/bin/perl
$logfile = '/usr/local/apache/logs/ipaccess.log';
$date = scalar localtime;
open(IPLOG, $logfile) || die "Cannot open $logfile";
$ip = $ENV{'REMOTE_ADDR'};
print IPLOG $date;
print IPLOG "$ip";
close IPLOG;
If I do it this way it errors out via the web:
#!/usr/bin/perl
$logfile = '/usr/local/apache/logs/ipaccess.log';
$date = scalar localtime;
open(IPLOG, ">>$logfile") || die "Cannot open $logfile";
$ip = $ENV{'REMOTE_ADDR'};
print IPLOG $date;
print IPLOG "$ip";
close IPLOG;
Mike
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]