<?php
 
 
$in = $_GET['data'];
 
$in = base64_decode($in);
 
 
$ar = explode(":", $in);
 
 
$ar['col'] = $ar[0];
 
$ar['num'] = $ar[1];
 
$ar['fil'] = $ar[2];
 
 
Header("Content-type: image/png");
 
$im = ImageCreateFromPNG("./images/{$ar['fil']}");
 
$blue = ImageColorAllocate($im, 0, 0, 100);
 
 
$font = "verdana.ttf";
 
 
$txtw = ImageFontWidth($font) * strlen($ar['num']);
 
$x = 50 - ($txtw / 2);
 
 
//add the number
 
ImageTTFText($im, 14, 0, $x, 24, $blue, $font, $ar['num']);
 
 
ImagePNG($im);
 
ImageDestroy($im);
 
 
?>
 
 |