Visitor counter for ActiveWorlds

====== On your server ======

Copy these two PHP scripts to any folder on your server. (ViewView)

For each counter you need, create a simple text file containing just a 0 (zero), rename it to something like test.cnt (the extension needs to be .cnt!) and upload it to the same folder. You can add more counters later.
make sure to set enough file permissions for the web users to modify the file (if in doubt use a=rw / 666).

In the examples I will use my server and path, you should replace those with your server and path of course.

Some PHP installations (XITAMI?) seem to issue warnings about missing variables if the command line argument isn't present, in this case add the following line to your script, somewhere near the header() function :
error_reporting (21);

====== The counter display in AW ======

Create a picture object with :
 create picture update=30
The script takes 3 arguments, the color arguments are optional :
- the counter name context=test
- the background color in hex bc=000000
- the text color tc=00ff00

The context corresponds to the .cnt file that you created before
The default for the colors is green on black so the image object will look like this :
sample You can place multiple of those displays of course.

====== The counter in AW ======

Create a picture object with :
 create picture
This picture object should be hidden somewhere, it will not show anything and it will generate a 404 error so it will not be cached - but still it will increment the counter.

This counter picture object should only exist once for each context.

Note:The script works only with your predefined context files so no one can fill up your webspace with unwanted counters.
cd / Back to my home
cd / Back to my PHP playground
cd /aw Back to my ActiveWorlds page
replace (ATNOSPAM)! Report problems to me,
please write only in english or german

Valid HTML 4.0!