September 29th, 2003, 06:33 AM
How do I go about putting a hit counter up on a website?
September 29th, 2003, 01:54 PM
September 30th, 2003, 04: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 04:42 PM.
September 30th, 2003, 04: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, 05:22 AM