I have a GIF at www.site.com/img/my.gif On a page a need to show it this way: <img src="http://www.site.com/cgi-bin/my.cgi"> What I have to write in my.cgi to show my image?
You need to set the content types in the CGI file. Normally when you print text/HTML you place this in the CGI script: print "Content-type: text/html\n\n"; This will allow you to print all HTML on the CGI pages without throwing a 500 internal server error. The one you need to use will be: print "Content-type: image/gif\n\n"; Once this is placed you can then stream the file by opening it, and printing the contents. Just like you would when reading a regular text file and displaying output. Hope this helps. Regards, acplus