Location: PHPKode > scripts > phpHitCounter > phphitcounter/examples/sample1.php

/* sample one : simple text based hitcounter */

/* include the main class file */

// create a object of the class hc,
// store the hits in a particular file,
// if the file does not exists try creating the file
$hit=new hc("c:/hits.txt",true);

// register a site hit

// display the hit counter
echo "You are visitor number: ";
echo $hit->showCounter();
Return current item: phpHitCounter