# Righto, get all the variables and stuff from the edit.me file #include ('edit.me'); # set a session ID session_start(); # This is the bit which adds to the count.txt file if ($count_what == 'visitors') { # First it creates a session Id for each visit so that it counts # visits rather than how many times a page is loaded. if (!$PHPSESSID) { $thefile = file("count.txt"); $count = implode("", $thefile); $count++; $myfile = fopen("count.txt","w"); fputs($myfile,$count); fclose($myfile); } # done } else { # Else it will count every page load $thefile = file("count.txt"); $count = implode("", $thefile); $count++; $myfile = fopen("count.txt","w"); fputs($myfile,$count); fclose($myfile); } ?>
