phpCounter ver 0.0.2 Documentation
Please read the INSTALL file for installation instructions.
You can create counters to monitor your web pages visitors. The counter you made will have a name which you will use to hit the the counter engine. There are two ways to hit the counter engine. First is PHP-code inclusion, on every page you want to monitor you have to include config.php and counter.php. These files are in your phpCounter-require-installation-directory. Counter performed using the hit()-function. This function has the following syntax
array hit(string countername);
This function return an array with three element which describe below.
- Counter, ammount of hit.
- Since, date of counter creation.
- Error, error message if occur.
See the usage example below :
<?echo $counter[counter];?> hit since <?echo $counter[since];?><br>
Error Message: <?echo $counter[error]?><br>
Substitute the countername with the appropriate counter name.
The second way is using image invocation, see the code below.
<img src="counter.php?counter=countername" alt="Counter">
Insert HTML code above in the page you want to monitor. Substitute the countername with the appropriate counter name.