On Wed, 6 Dec 2000, byron wise wrote: > I sent this question out once before but this issue remains unresolved. > Any help would be appreciated. > > I want a cgi script to display a gif to a browser. Let's say the gif is at: > /web/a/b/thegif.gif > > I have tried: print $q->header( "image/gif" ); but i'm not sure this works. > > after that I tried to open the gif and print to screen, but i don't think > I'm doing it right. > You need to send the browser the mime-type header for the image file followed by the binary contents of the gif file. For example: print "Content-Type: image/gif\n\n"; open(GIF,"giffile.gif") or die; binmode GIF; select(GIF); $/=''; select STDOUT; print <GIF>; **** [EMAIL PROTECTED] <Carl Jolley> **** All opinions are my own and not necessarily those of my employer **** _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users