$counter = file_get_contents("counter.txt"); $counter++; $fp = fopen('counter.txt', 'w'); fwrite($fp, $counter); fclose($fp); ?>