|
how to count traffic? php
hi. i am selling some traffic and i need some php script to count ourgoing hits. what to use?
now i am using this one:
<?
$counthandle=fopen("file.txt","r");
$getcurrent=fread($counthandle,filesize("file.txt" ));
$getcurrent=$getcurrent+1;
fclose($counthandle);
$counthandle1=fopen("file.txt","w");
fputs($counthandle1,$getcurrent);
fclose($counthandle1);
header("Location: XXX");
?>
but i have problem with this. counter is sometime reseting to 1 and i don't know why?
|