ODB name:suites.hitCounter
Version:1.2
Version Date:24 Apr 1997
Download: hitcounter.hqx

The HitCounter Suite


Overview

Provides the logic behind a simple page-hit counter CGI. Returns the hit count as a string, not a graphic.
Implemented using Frontier for use as a server-side include (SSI) tool.

It uses (and requires) the AllowDeny Suite.

Tested with Quid Pro Quo.


Copyright and Permissions

Created by Samuel Reynolds.
Copyright © 1997 by Samuel Reynolds. All rights reserved.

Permission is hereby granted to use this software for private or commercial use at no charge, and to distribute it with this documentation in its original form. You may modify the software for private or commercial use, but may not distribute modified versions of the scripts. You may not sell this software, either as is or as part of another product, without express written consent from the author.

This software is provided "as-is," without guarantee or warrantee of any kind.

If you have suggestions or changes you think should be included for distribution with future versions of this software, please contact the author at <reynol@primenet.com>.


Parameters

name
Optional symbolic name for counter.
Defaults to name of file it is included in.

quiet
Optional flag. Defaults to false.
If true, count is incremented, but the CGI returns an empty string.

See documentation for AllowDeny Suite for information on allowing and/or denying use of the CGI script from particular client IP addresses or domains.


Examples

Descriptions assume the CGI is called for inclusion in a file called "myFile.html".

<!--#exec virtual="hitcounter.fcgi" -->
Increments and returns value of counter named "myFile.html".
Creates counter if it does not already exist.

<!--#exec virtual="hitcounter.fcgi$quiet=true" -->
Increments value of counter named "myFile.html". Returns empty string.
Creates counter if it does not already exist.

<!--#exec virtual="hitcounter.fcgi$name=keyword" -->
Increments and returns value of counter named "keyword".
Creates counter if it does not already exist.

<!--#exec virtual="hitcounter.fcgi$name=keyword&quiet=true" -->
Increments value of counter named "keyword". Returns empty string.
Creates counter if it does not already exist.

Copyright © 1998, 1999 by Samuel Reynolds. All rights reserved. Last modified 1999/02/16.
Built with Frontier v.6.0 on Macintosh OS 8.1 on 1999/05/23.