Unicounter : Parameter Reference

Name Default Meaning
cache 0 Boolean : Allow the counter to be cached.
deliver none url : see below
Primarily used with download counters to specify the desired file.
It may also be used with an <img> tag to create a hidden counter.
inc 1 Boolean : Increment the counter (or not).
Ignored if a new counter is created and the create parameter is specified.
name none The name of the file that will be used to store counter data. ¹
write 1 Boolean, ssi or jsvar: Output value of counter.
Use write=ssi with server-side includes.
Use write=jsvar to use counter output in other javascript code. ²
The following parameters may be used when creating a new counter file.
create 0 Integer : initial value of counter.
trackip 8 Integer 0 - 16 : The number of IP addresses to be stored to reduce false increments.
¹ Unless you specify a name of the form /countervalues/countername, the counter file will be located in the same directory as the script file unicounter.pl.
² When write=jsvar is used, the counter output will be, for example :-
var countername=703;

The deliver parameter

Earlier versions required a fully-qualified url, however, starting with version 1.03, the operation of the deliver parameter has been enhanced. Three forms of url are now accepted.

  1. Fully-qualified url e.g. deliver=http://www.example.com/downloads/example.exe
  2. Domain-relative url e.g. deliver=/downloads/example.exe
    Domain-relative urls must begin with the / character
  3. Domain-wildcard url e.g. deliver=http://*/downloads/example.exe
    The * character represents the domain name.
    This syntax permits other protocols such as ftp to be specified without including the domain name.
NOTE
When the domain name is not specified, it is determined by inspecting the environment variable HTTP_HOST. To ensure that this works correctly on your server, you should enter the following :-
http://www.yourdomain.com/cgi-bin/counters/unicounter.pl?name=test&deliver=http://*/
When working correctly, you should be redirected to the domain's home page.