Teen Programmers Unite  


Return to forum top

Server side scripting using compiled languages.

Posted by manoj [send private reply] at March 27, 2002, 02:28:04 PM

Using perl etc is pretty clear but I don't know how to use C,C++ in the Action tag in the form attribute in HTML. Basically how does one go about using any compiled language to make a guestbook sort of thing? Also I can't find a tutorial on the subject! Plz help.

Posted by taubz [send private reply] at March 27, 2002, 05:04:54 PM

There's no difference. They're both programs. The output of a C program (in compiled form, of course) is sent to the client, just as the output of a Perl program is.

Posted by manoj [send private reply] at March 28, 2002, 05:59:31 AM

Thanks Taubz,

Actually I meant all the executables are OS dependent, so it seems a little confusing as the same compiled file will behave differently for diff servers unlike interpreted ones. Lets say the c compiled file is guest.exe, so is it enough to write action="guest.exe" at the tag? Also what about the cgi extension, as, if added afterwards, it will become guest.exe.cgi!! Plz give the exact format if the above one is not OK. Is there some example available that uses c/c++ for guestbook etc?

PS: By mistake I posted another copy of this as a new question outside and was not clear how to delete it. Don't bother about it.

Posted by Psion [send private reply] at March 28, 2002, 07:43:52 AM

Yes, they're OS dependent, so write the program for the platform on which you plan to use it. You don't need any additional extensions if your web server is set up to know where to find CGI programs. It all depends on your configuration.

Posted by manoj [send private reply] at March 28, 2002, 11:11:31 AM

Now its pretty clear. Thanx 4 ur support.

Posted by unknown_lamer [send private reply] at March 28, 2002, 02:39:00 PM

If you are using C++ you might want to use GNU CGIC. It makes it somewhat easier to write CGI stuff in C++. You can grab it at http://www.gnu.org/software/cgicc/cgicc.html . It is a completely portable library (about the only thing it uses is iostream), so it even works on Windows.

Posted by manoj [send private reply] at March 29, 2002, 10:29:02 AM

Thanks unknown. I'll check it out.

You must be logged in to post messages and see which you have already read.

Log on
Save for later automatic logon

Register as a new user
Copyright TPU 2002. See the Credits and About TPU for more information.