I'm trying to insert a counter somewhere within my board, but cant figure out the best place to do it.
Basically, its a single line that calls a count.php file...
PHP Code:
<?
### IMAGE FORMAT
$format = ".png";
#######################################
## (C) 2000 Total Eclipse Scripts
#
### This script is free for personal
### or commercial use.
#
# problems? [email]scripts@tescripts.net[/email]
#######################################
$file = file("count.txt");
$num = ($file[0] + 1);
exec("echo $num > count.txt");
switch($type) {
case "text":
echo $num;
break;
case "gfx":
$i = 0;
$cntn = strlen($num);
while($i < $cntn) {
$tmpnum = substr($num, $i, 1);
echo("<img src=\"$dir/$tmpnum$format\">");
$i++;
}
break;
case "q":
break;
default:
echo("count.php <b>error</b> : type not specified.");
break;
}
?>
And the little line of code that should spit out an image is this...
PHP Code:
$type = "gfx"; $dir = "counter"; include("count.php");
Where should I put this? I tried a few things, but couldnt get it right.