cgi - c++ returns image

This is a discussion on cgi - c++ returns image within the C++ Programming forums, part of the General Programming Boards category; hello im trying to learn cgi programming using c++, i know how to create a dinamyc html page using c++ ...

  1. #1
    Registered User
    Join Date
    Mar 2004
    Posts
    113

    cgi - c++ returns image

    hello
    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:

    i type:
    www.mysite/cgi-bin/image.cgi

    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

  2. #2
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem reading tiff image files?
    By compz in forum C++ Programming
    Replies: 9
    Last Post: 10-30-2009, 04:17 AM
  2. Replies: 1
    Last Post: 05-27-2009, 12:46 PM
  3. Polynomials and ADT's
    By Emeighty in forum C++ Programming
    Replies: 20
    Last Post: 08-19-2008, 08:32 AM
  4. Replies: 4
    Last Post: 03-02-2003, 08:12 AM
  5. Contest Results - May 27, 2002
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 06-18-2002, 01:27 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21