cgi - c++ returns image
im trying to learn cgi programming using c++, i know how to create a dinamyc html page using c++ and cgi, create forms etc, but i need a simple cgi i returns a simple gif to the browser ie:
the browser sends the request to the server and the cgi is executed then a gif image is displayed in the internet browser
i found a lot of code but in perl and php but i need to know how to doit in c++ any idea?
sorry if this is not the right place to post this
please excuse my poor english
The CGI portion of it should all be the same - just look at what the perl and php scripts are sending to the screen, and that's what you should send to the screen. Two options: Send an HTML file that has the image in an <img> tag (for formatting purposes, I would use this method), or to send JUST the picture, you'd have to look into MIME types, etc... Personally I never did that. Try the IMG tag method, or if that's a problem let me know.