This is what I have:
header("Content-type: image/jpeg");
if(!isset($_GET['text1']) || !isset($_GET['font1']) || $_GET['text1'] == null || $_GET['font1'] == null) {
print_r($_GET);
//header("LOCATION:".$referer);
exit;
}
$ftext = $_GET['text1'];
$font1 = $_GET['font1'];
$hex = explode('-', $_GET['color1']);
$c1 = $hex[0];
$c2 = $hex[1];
$c3 = $hex[2];
/*
create canvas
*/
$im = imagecreate(600,75);
$can_background = imagecolorallocate($im, 255,255,255);
/*
Check for shadowing
*/
if(isset($_GET['shadowcolor1']) && $_GET['shadowcolor1'] != null) {
$hex = explode('-', $_GET['shadowcolor1']);
$s1 = $hex[0];
$s2 = $hex[1];
$s3 = $hex[2];
$shadow = imagecolorallocate($im, $s1,$s2,$s3);
imagettftext($im, 50, 0, 24, 52, $shadow, $font1, $ftext);
imagettftext($im, 50, 0, 23, 51, $shadow, $font1, $ftext);
}
$fcolor = imagecolorallocate($im, $c1,$c2,$c3);
imagettftext($im, 50, 0, 20, 50, $fcolor, $font1, $ftext);
imagejpeg($im);
imagedestroy($im);