Skip to content

Instantly share code, notes, and snippets.

@antistereotip
Created May 2, 2018 14:08
Show Gist options
  • Save antistereotip/24f814f77917d68df0f7022d9273af88 to your computer and use it in GitHub Desktop.
Save antistereotip/24f814f77917d68df0f7022d9273af88 to your computer and use it in GitHub Desktop.
<?php
/* counter */
//opens countlog.txt to read the number of hits
$datei = fopen("./countlog.txt","r");
$count = fgets($datei,1000);
fclose($datei);
$count=$count + 1 ;
echo "<p>$count" ;
echo " hits</p>" ;
echo "\n" ;
// opens countlog.txt to change new hit number
$datei = fopen("./countlog.txt","w");
fwrite($datei, $count);
fclose($datei);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment