Yep! There is one and it is very simple. There are no guarantees regarding this software! Use it at your own risk!
Q. What can cgicount.py do for me?
A. This script in combination with XBMNumbers16x20.py can generate the simplest hit counter that simply counts the number of times your web page was loaded. It reads the number out of a file, increments it by one, stores the new value in the same file, and returns an XBM image. You can easily improve this script by changing the way the hit count information is stored, i.e. by storing it in a database, etc.
Q. How do I hook up cgicount.py to my web site?
A. Just follow these steps:
copy cgicount.py and XBMNumbers16x20.py into your web server's cgi directory
Set the file attributes by executing chmod 755 cgicount.py XBMNumbers16x20.py
create a file that will store the count in your cgi directory. Let's say you called your count file count.
Attention: This file has to be writable to the user that is used to launch the cgi script. You can use set uid technique if you want this file to be read-only for the general public.
Add the following to the HTML document you want to contain the count:
the output should look something like this:
On to the source files: cgicount.py, XBMNumbers16x20.py