- Code: Select all
<?php
if($_COOKIE["countplus"] != 1)
{
$txt = file_get_contents("counter.txt");
$txt++;
file_put_contents("counter.txt", $txt);
$txt = file_get_contents("counter.txt");
$l = strlen($txt);
$nrofo = 6 - $l;
for ($i = 0; $i <= $nrofo; $i++) {
echo "<img src='../IMG/0.bmp'>";
}
for ($i = 0; $i <= $l - 1; $i++) {
echo "<img src='../IMG/" . $txt[$i] . ".bmp'>";
}
setcookie("countplus", "1", time()+60*60*24);
} else
{
$txt = file_get_contents("counter.txt");
$l = strlen($txt);
$nrofo = 6 - $l;
for ($i = 0; $i <= $nrofo; $i++) {
echo "<img src='../IMG/0.bmp'>";
}
for ($i = 0; $i <= $l - 1; $i++) {
echo "<img src='../IMG/" . $txt[$i] . ".bmp'>";
}
}
?>
Copy the digits in a folder called IMG(I put them as a attachment)

