<?
header ("Content-type: image/png");
$string = date("d");
$font  = 4;
$width  = ImageFontWidth($font)* strlen($string) ;
$height = ImageFontHeight($font) ;

$im = ImageCreateFrompng("calendar_blank.png");
$x=16;
$y=6;
$background_color = imagecolorallocate ($im, 255, 255, 255); 
$text_color = imagecolorallocate ($im, 255,255,255);
imagestring ($im, $font, $x, $y,  $string, $text_color);

imagepng ($im);
?>