print "Content-type:text/html\n\n"; the html displays fine, but the images appear as binary code. If I use the print "Content-type: image/gif\n\n";