<?php
/* sample two : simple text based hitcounter but looks for unique visitors */
/* include the main class file */
include("../hitcounter.class.php");
// create a object of the class hc,
// store the hits in a file,
// if the file does not exists try creating the file
// log visitors in a file
$hit=new hc("c:/hits.txt",true,"c:/visitor.txt");
// tell the counter to report only unique visitors
$hit->uniqueVisitor(true);
// register a site hit
$hit->hitSite();
// display the hit counter
echo "You are visitor number: ";
echo $hit->showCounter();
?>