Error, could not find ".$counterfile.".dat in ".$path.", please check it!";
}
if($formatnumber)
{
$count_new = number_format($count, 2, ",", ",");
$count_new = substr($count_new, 0 , -3);
$count = $count_new;
}
if($showimage)
{
$width = imagefontwidth($font) * strlen($count);
$height = imagefontheight($font);
$im = @imagecreate($width, $height);
if(trim($bgcolor) == "black")
$background_color = imagecolorallocate($im, 0, 0, 0); // black background
else
{
$background_color = imagecolorallocate($im, 255, 255, 255); //white background
imagecolortransparent($im, $background_color);
}
if(trim($fontcolour) == "black")
$text_color = imagecolorallocate($im, 0, 0, 0); // black text
else
$text_color = imagecolorallocate($im, 255, 250, 205); // white text or colour you want (#fffacd=255,250,205)
imagestring($im, $font, 0, 0, $count, $text_color);
header("Content-type: image/gif");
imagegif($im);
imagedestroy($im);
}
else
{
print $count;
}
?>