#!/usr/local/bin/perl

require "/afs/unc/proj/wwwc-f95/lib/cgi-lib.pl";

&ReadParse(*input);

dbmopen(%counters, "/afs/unc/home/jbs/public_html/counts/counters", 0777);

$file = $input{"file"};
$counters{"$file"}  += 1;

dbmclose(%counters);

print "200 ok\n";
print "Content-type: text/plain\n";
print "Location: /private/images/null_tr.GIF\n";
print "\n\n";

open(LOGFILE, ">>/afs/unc/home/jbs/public_html/counts/testfile");
$host = $ENV{REMOTE_ADDR};
$date = `date`;
chop($date);
print LOGFILE "$file\;$host\;$date\n";
close(LOGFILE);


