Kreslenie čiar cez GD.

<? 
$im = ImageCreate(301, 301); 
$bgc = ImageColorAllocate($im,255,255,255); 
$tc = ImageColorAllocate($im,0,0,0); 
//ImageLine(image, x1, y1, x2, y2, color); 
ImageLine($im, 0, 100, 0, 300, $tc); 
ImageLine($im, 0, 300, 300, 300, $tc); 
ImageLine($im, 300, 300, 300, 100, $tc); 
ImageLine($im, 300, 100, 0, 100, $tc); 
ImageLine($im, 0, 100, 150, 0, $tc); 
ImageLine($im, 150, 0, 300, 100, $tc); 
 
 
Header("Content-type: image/gif"); 
ImageGif($im); 
?>