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
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.
Advertise your mobile site for FREE with [Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks