[SOLVED] Counter Problem...
Posted: Tue Jan 11, 2005 5:36 am
Nice New Style 
I'm using a counter off a site, which had it as a tutorial. Im sorry but i cannot rmember where i got it from however when i place it on a page it counts two hits instead of just one hit.
tags dont work 
Could someone tell me where im going wrong.
I'm using a counter off a site, which had it as a tutorial. Im sorry but i cannot rmember where i got it from however when i place it on a page it counts two hits instead of just one hit.
Code: Select all
<?php
echo "<center><font face="verdana" size="1">";
$counthandle=fopen("sample.php","r");
$getcurrent=fread($counthandle,filesize("sample.php"));
$getcurrent=$getcurrent+1;
fclose($counthandle);
$counthandle1=fopen("sample.php","w");
fputs($counthandle1,$getcurrent);
fclose($counthandle1);
$counthandle2=fopen("sample.php","r");
$getrecent=fread($counthandle2,filesize("sample.php"));
print "$getrecent";
fclose($counthandle2);
echo "</center></font>";
?>Code: Select all
Could someone tell me where im going wrong.