Hello. I wonder how i can make my page update a .txt file each time someone visit my page? when someone visits the number in the .txt should change 1 number, like each visit 1 then 2 thne 3, 4, 5, etc, how can i do this? the file is called "view.php" and the txt is called "view.txt"
$filename = "counter.txt"; $count = file_get_contents($filename); if ($count == null) $count = 0; echo $count; $count++; $handle = fopen($filename, "w+"); fwrite($handle, $count); fclose($handle); PHP:
Cheers m8 however, i dont want the counter number to be shown on my page :/ i just want it to count into the txtfile for my private stats checking.