<?
$file = "count.dat";
if (!is_file($file)) { $open = fopen($file, "w"); fclose($open); }
$count = implode('',file($file)) + 1;
if (eregi("E", $count)) { $open = fopen("count.dat", "w"); fclose($open); echo "clear"; }
else {
	$open = fopen($file, "w");
	fwrite($open, $count);
	fclose($open);
	$i = "0";
	$len = strlen($count)-1;
	$chop = chop("$count");
	while ($i <= $len) { echo "<IMG SRC='i/$chop[$i].gif'>"; $i++; }
}
?>
Published in: PHP
Download

Related snippets