#!/usr/bin/perl # Simple text counter. # Must be used as a Server Side Include # Kevin Meltzer 3/8/97 $counter = "count.dat"; $silent = 0; # 0 - shows to page # 1 - logs count, but doesnt show $link = 1; # 0 - no link # 1 - link count $link_URL = "http://www.normakfashions.com/contact.htm"; # only needs to be set # if you are linking open (FILE, "$counter") || print "Can't read counter. $!\n"; #flock (FILE, 2); $visits = ; #flock (FILE, 8); close (FILE); open (FILE, ">" . $counter) || die "Cant write to counter.\n"; #flock (FILE, 2); $visits++; print FILE $visits; #flock (FILE, 8); close (FILE); if ($silent eq 0) { if ($link eq 1) { print "$visits"; }else{ print $visits; } }