Welcome to the Dead Internet Project


Home | Blog | Chat Room | Coding | File Archive | Internet History | Webring | Contact


Advertise here

Hit Counter
PHP

A simple hit counter script that tracks the number of visitors to a page. Counts all hits.

Go Back

<?php
	$counter_file = 'counter.txt'; // File to store the hit count
	if (!file_exists($counter_file)) {
		file_put_contents($counter_file, '0');
	}
	$count = intval(file_get_contents($counter_file));
	$count++;
	file_put_contents($counter_file, $count);
	echo "<h4>You are visitor number: $count</h4>";
?>
						

© Copyright Dead Internet Online. All Rights Reserved.