Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // variables (change these)
- $file = 'pageloads.log';
- $dispay = TRUE;
- // adds +1 to the count
- $count = file_get_contents($file);
- $newcount = $count +1;
- $handle = fopen($file, "w");
- fwrite($handle, $newcount);
- fclose($handle);
- if($display = TRUE) {
- echo "Pageloads: $newcount";
- }
- else {
- //do nothing
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment