<?

// set the size of the image
$imgWidth=320;
$imgHeight=280;

// send headers to browser
header("Content-type: image/gif");

// allocate memory for image
$image=imagecreatetruecolor($imgWidth$imgHeight);

// fill image with random color pixels
for ($i=0$i<=$imgWidth$i++){
    for (
$j=0$j<=$imgHeight$j++){
        
imagesetpixel ($image,$i,$j,imagecolorallocate($image,rand(0,255),rand(0,255),rand(0,255)));
    }
}

// display image
imagegif($image);

// clear image from memory
imagedestroy($image);

?>