Put this code in the top of the document, before all HTML code.
Now paste this code were you want the counter to appear, it's text only.
Now create a file called counter.log and CHMOD it to 646.
PHP Code:
$logfile="/counter.log";
$counted=$_COOKIE["counted"];
if(!$counted) setcookie("counted",1,time()+86400);
PHP Code:
$num=file_get_contents($logfile);
if(!$counted){
$fp=fopen($logfile,"w") or die("OMFG");
$num++;
fwrite($fp,$num);
fclose($fp);
}
echo($num);
Now create a file called counter.log and CHMOD it to 646.
