PHP - Simple PHP Counter

Simple php Counter 

<?php
$datei = fopen("counter.txt","r+");
$counterstand = fgets($datei, 10);
if($counterstand == "")
   {
   $counterstand = 0;
   }
if($counterstand == "999999")
   {
   $counterstand = 0;
   }
$counterstand++;
echo $counterstand;
rewind($datei);
fwrite($datei, $counterstand);
fclose($datei);
?>

Kommentare

Beliebte Posts aus diesem Blog

Ampelschaltung Teil 1 - HTML, CSS und JavaScript Basics

HTML - jquery - mobile - Kontaktformular