<?PHP
Header ("Content-type: image/jpeg");
$im = imagecreate (128,128);
$tmp = $HTTP_GET_VARS["c"]; // text color
if (empty ($tmp))
{
srand((double)microtime()*1000000);
$r = rand (0, 255);
$g = rand (0, 255);
$b = rand (0, 255);
}
else
{
$r = hexdec (substr ($tmp, 0, 2));
$g = hexdec (substr ($tmp, 2, 2));
$b = hexdec (substr ($tmp, 4, 2));
}
$back = ImageColorAllocate ($im, $r, $g, $b);
ImageJPEG ($im);
ImageDestroy ($im);
?>