Archived

This topic is now archived and is closed to further replies.

bdc256

C++ and The Web

Recommended Posts

bdc256    154
Can Some one please give me a simple example of how to link a C++ program to the web. As a CGI program, or any other way you know how. I would like it to retive a small amount of data, but a counter program would be good to.

Share this post


Link to post
Share on other sites
Palidine    1315
you need a web host that allows you to run CGI-BIN scripts/programs. until you have that you can''t do anything.

you should also look into PHP or Jsp/Java. those also require special permissions / setups on the webserver, but are a better way to go about introducing computer code-type logic into webpages

-me

Share this post


Link to post
Share on other sites
Vasialek    130
Probably, u should read little about dynamic/cgi programming. Try PHP first, to get sense of web programming. Then migrate to C/C++. There are several libraries that could help u in data manipulation:

http://www.eekim.com/software/cgihtml/cgihtml.html
http://libcgi.sourceforge.net/

Lekha

Share this post


Link to post
Share on other sites
daerid    354
cgi programs are fairly simple

If memory serves, they''re basically the equivalent of console programs (although I don''t remember if querystring/form data is passed on stdin or argv[])

But to write the HTML output, just cout or printf() it.

Share this post


Link to post
Share on other sites
Kylotan    9860
quote:
Original post by daerid
(although I don''t remember if querystring/form data is passed on stdin or argv[])

I think GET (querystring) is generally passed as the argv[] and POST (form data) is usually passed as stdin.


[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost | Asking Questions | Organising code files | My stuff ]

Share this post


Link to post
Share on other sites