Add a page view counter
To add a visit counter (to count the number of times the page was displayed), you need to have a file to store the count data and modify a few lines in the sample.php file, in which you will increment the counter.
Find the following lines:
define('CHEMIN', '../');
include(CHEMIN."inc/includes.inc");
After this lines add the following:
$ÂÂfile = CHEMIN.'data/my_counter.dtb';
$ÂÂÂÂÂÂÂÂÂcount = ReadCounter($ÂÂfile) + 1;
WriteCounter($ÂÂfile, $ÂÂÂÂÂÂÂÂÂcount);
Replace the file name "my_counter.dtb" by the name of your data file. (that you created to store this information)
Use the $ÂÂÂÂcount variable to display the counter value ( for example: echo $ÂÂÂÂcount; )
Find the following lines:
define('CHEMIN', '../');
include(CHEMIN."inc/includes.inc");
After this lines add the following:
$ÂÂfile = CHEMIN.'data/my_counter.dtb';
$ÂÂÂÂÂÂÂÂÂcount = ReadCounter($ÂÂfile) + 1;
WriteCounter($ÂÂfile, $ÂÂÂÂÂÂÂÂÂcount);
Replace the file name "my_counter.dtb" by the name of your data file. (that you created to store this information)
Use the $ÂÂÂÂcount variable to display the counter value ( for example: echo $ÂÂÂÂcount; )