you remember the gzip image that i've used at besttop and other my sites which showed the compression percentage?
many wapmasters have cloned it and still are still using it at their sites but results were not as nice as the original.
so here is the original code. (c) gumslone
for the ttf font you can search on google or use your own.
many wapmasters have cloned it and still are still using it at their sites but results were not as nice as the original.
so here is the original code. (c) gumslone
PHP Code:
<?php
$num = $_GET['num'];
$size = imagettfbbox(6, 0, "/fonts/04B_03B.TTF", $num.'%');
$xsize = abs($size[0]) + abs($size[2]);
$x4=29+$xsize;
$im = @ImageCreate ($x4, 11)
or die ("Kann keinen neuen GD-Bild-Stream erzeugen");
$background_color = ImageColorAllocate ($im, 255, 255, 255);
if ($num>0) $text_color3 = ImageColorAllocate ($im, 100, 230, 50);
else $text_color3 = ImageColorAllocate ($im, 255, 0, 0);
Imagefilledrectangle ($im, 0, 0, 64, 9, $background_color );
ImageTTFText ($im, 6, 0, 3, 8, $text_color3, "/fonts/04B_03B.TTF","GZIP");
Imageline ($im, 23, 0, 23, 9, $text_color3);
ImageTTFText ($im, 6, 0, 26, 8, $text_color3, "/fonts/04B_03B.TTF",$num.'%');
Imagerectangle ($im, 0, 0, $x4-1, 10, $text_color3);
header('Content-Type: image/PNG');
ImagePNG ($im);
imagedestroy($im);
?>
for the ttf font you can search on google or use your own.