Code:<?php $datei = fopen("counter.txt","r+"); $counterstand = fgets($datei, 10); if($counterstand == "") { $counterstand = 0; } $counterstand++; rewind($datei); fwrite($datei, $counterstand); fclose($datei); if(($counterstand % 100) == 0) { echo"Sie sind der ".$counterstand.". Besucher, hole dir dein Preis hier ab: <a href=\"gewinner.php\">ICH WILL MEIN GELD!!!</a>"; ?>
Das solte gehen, aber der Counter hat keine reloadsperre.
Es muss im gleichen Ordner, in dem auch das Script liegt, eine Datei namens counter.txt liegen.