Header("Content-Type: image/jpeg");
$font_size = 2; // image font size
// create image
$im = imagecreatefromjpeg(\'cntr/cntr.jpg\');
$bg_color = ImageColorClosest ($im,255,255,255);
$text_color = ImageColorClosest($im,255,255,0);
ImageString($im,1,8,8,\'Today\',$text_color);
ImageString($im,1,8,18,\'Last day\',$text_color);
ImageString($im,1,8,30,\'Total\',$text_color);
$text_color = ImageColorClosest ($im,255,255,255);
$start_x = ImageSX($im)-strlen($counter)*ImageFontWidth($font_size)-8;
$start_y = 8;
ImageString($im,$font_size,$start_x,$start_y,$counter,$text_color);
$start_x = ImageSX($im)-strlen($yestcount)*ImageFontWidth($font_size)-8;
$start_y = 5;
ImageString($im,$font_size,$start_x,$start_y+ImageFontHeight($font_size),$yestcount,$text_color);
$start_y = 3;
$start_x = ImageSX($im)-strlen($totalcount)*ImageFontWidth($font_size)-8;
ImageString($im,$font_size,$start_x,$start_y+ImageFontHeight($font_size)*2,$totalcount,$text_color);
// show image
Imagejpeg($im);