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


/* sample one : simple text based hitcounter */

/* include the main class file */
include("../hitcounter.class.php");

// 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
$hit->hitSite();

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