September 29th, 2003, 05:33 AM
How do I go about putting a hit counter up on a website?
September 29th, 2003, 12:54 PM
September 30th, 2003, 03:34 PM
writing one: Perl
Make a file count.cgi in your cgi-bin:
Then, wherever you want the html code to go, do:
$count = $_;
print "<table><tr><td>$count visitors so far!</td></tr></table>\n";
print OUTFILE "$count";
EDIT: closing my filehandle!
Last edited by linuxChique; September 30th, 2003 at 03:42 PM.
September 30th, 2003, 03:53 PM
You should lock your files as well, because this will get borked under concurrent accesses. It will lose or corrupt data.
October 3rd, 2003, 04:22 AM