Code for Drawing Rotated Text
SLAVE CODE FOLLOWS
<?php // PHP slave script drawing rotated text
// === create background work area
// create a blank image that is 160 by 160 pixels in size
$image = imagecreatetruecolor(160, 160);
// set a color RGB (238, 238, 238), which is GRAY
$gray = imagecolorallocate($image, 238, 238, 238);
// fill the entire image
imagefilledrectangle($image, 0, 0, 160, 160, $gray);
// set the foreground RGB color for the text
// ( 0, 51, 102) is a DARK BLUE
$color = imagecolorallocate($image, 0, 51, 102);
$font = 'arial.ttf';
$str = "Got It!";
// combine the background image with a rotated text using the following specs
// (image, font-size, angle-rotation, x-position, y-position, text-color, font-name, text)
imagettftext($image, 20, 45, 15, 150, $color, $font, $str);
// display the image
imagegif($image);
// destroy the image (i.e., releases memory)
imagedestroy($image);
?>