OK i downloaded this nice simple random Img script,
and i want to make it add the ip address of the caller to the log file
any ideas where i would start would be most helpful...

and i know i could just look in the httpd logs, but that way i learn no perl...

thanks in advance 

        Ritch.T

# Necessary Variables
  $basedir = "http://piratestreams.tk/~owl/YaBBImages/";;
  @files = 
("interFACE.gif","new-interFACE.jpg","mainlogo.gif","skullanim.gif","blank.gif","blank.gif","blank.gif","blank.gif","blank.gif","blank.gif","blank.gif");
  $date = `/bin/date`; chop($date);
# Options
  $uselog = 1; # 1 = YES; 0 = NO
        $logfile = "/usr/local/apache/cgi-bin/owl/yabb/interFACE-Title.log";
# Done
##############################################################################
srand(time ^ $$);
$num = rand(@files); # Pick a Random Number
# Print Out Header With Random Filename and Base Directory
print "Location: $basedir$files[$num]\n\n";
# Log Image
if ($uselog eq '1') {
    open (LOG, ">>$logfile");
    print LOG "$files[$num] $date\n";
    close (LOG);
}
---
Outgoing mail was scaned for Viruss.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.491 / Virus Database: 290 - Release Date: 18/06/2003

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to