[man]imagefttext[/man] let's you supply the size, angle, lower lefthand corner and the font for the text. All these can be used in combination to do what you're looking for with the text with something like this:
<?php
<?php
$img_size = array('Width' => 350, 'Height' => 75);
$num_colors = 10;
$num_lines = 10;
$font_dir = 'fonts';
$str_len = 6;
//make an empty picture
$im = imagecreatetruecolor($img_size['Width'],$img_size['Height']);
//turn the picture black
$background_color = imagecolorallocate($im,0,0,0);
//build an array of possible colors.
$colors = array();
for($i=0;$i<$num_colors;$i++) {
$red = mt_rand(170,255);
$green = mt_rand(170,255);
$blue = mt_rand(170,255);
$colors[] = imagecolorallocate($im,$red,$green,$blue);
} //end for
//build an array of possible fonts.
$fonts = array();
$dh = opendir($font_dir) or die('could not open fonts dir.');
while(($file = readdir($dh)) !== FALSE) {
if(!is_dir($font_dir . '/' . $file) && eregi('\.ttf$',$file))
$fonts[] = $font_dir . '/' . $file;
} //end while
//set up the random text for the image
$text = '';
for($i=0;$i<$str_len;$i++) {
$what = mt_rand(0,3);
if($what == 0)
$text .= chr(mt_rand(65,90));
elseif($what == 1)
$text .= chr(mt_rand(97,122));
else
$text .= mt_rand(0,9);
} //end for
//print each character to the picture with random angle, font and color
for($i=0;$i<$str_len;$i++) {
$color = $colors[mt_rand(0,(count($colors)-1))];
$font = $fonts[mt_rand(0,(count($fonts)-1))];
$angle = mt_rand(-75,75);
$height_offset = mt_rand(20,40);
imagettftext($im,20,$angle,(($i+1) * 40),
($img_size['Height'] - $height_offset),$color,$font,$text{$i});
} //end for
//draw some lines random place, length and color
for($i=0;$i<$num_lines;$i++) {
$color = $colors[mt_rand(0,(count($colors)-1))];
$len = mt_rand(10,100);
$incline = mt_rand(-25,25);
$x1 = mt_rand(0,($img_size['Width'] - $len));
$y1 = mt_rand(abs($incline),($img_size['Height'] - abs($incline)));
$x2 = $x1 + $len;
$y2 = $y1 + $incline;
imageline($im,$x1,$y1,$x2,$y2,$color);
} //end for
header('Content-type: image/png');
imagepng($im);
?>