#!/usr/local/bin/perl # SSIが使えない場合のサンプルスクリプトです。 # # (c)Copyright 1999,2000 Whitire Company print "Content-type: image/gif\n\n"; # Logfile name $file = "./access.log"; # Get current date/time ($sec, $min, $hour, $mday, $mon, $year) = localtime(time); $year += 1900; $mon++; # Output open(OUT, ">> $file"); $r_addr = $ENV{'REMOTE_ADDR'}; $r_host = gethostbyaddr(pack("C4", split(/\./,$r_addr)), 2); print OUT "1#($ARGV[0])$year/$mon/$mday $hour:$min:$sec\n", # Date/Time "2#$ENV{'HTTP_USER_AGENT'}\n", # OS/Browser "3#$ENV{'HTTP_REFERER'}\n", # Refer "4#$r_host($r_addr)\n", "\n"; close(OUT); open(IN, "./toka.gif"); while () { print; } close(IN); exit 0;