View Single Post
Old 03-31-2004, 03:51 AM  
savas
Registered User
 
Join Date: Aug 2002
Posts: 1,045
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?
savas is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote