[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 301
  • Last Modified:

CGI with C/C++

How do you write CGI scripts in C/C++? I've looked all over the net, and everyone says that you can do it, but no one actually shows you how.  Could someone send me a small bit of source code that shows some text and a small graphic as examples.  Also, could you show me how to compile it and set it up on the web(what directories I'm allowed to put the file in)?  I'm running Win NT or Linux.  I'd prefer if you'd show me how to do it in Linux, though. Thankyou in advance,
Adam
0
marc_adam
Asked:
marc_adam
1 Solution
 
marc_adamAuthor Commented:
Edited text of question.
0
 
helverCommented:
Is there compelling reason that you want to do them in C?  

If you really must, there are some libraries that may help you.  I believe one is called cgicc:

http://www.gnu.org/software/cgicc
0
 
stekman_Commented:
0
 
stekman_Commented:
Forgot:

It's a bettter to use PHP, it's a lot like C/C++ but can be embedded in the pages. It also is a lot safer to use, as it's easy to create vunerable cgi-programs i C/C++ (tiny bug -> buffer overflow-> root-access -> site hacked...).

You find PHP on:

http://www.php.net/

/Stefan
0
 
jhurstCommented:
I have written a huge site in C and think that there are some cases where it is by far the best language.  The real problem is that many web-managers do not allow C on their systems, having security concerns.

Certainly, if you need speed, and features not easily available in perl, C is tough to beat.
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now