CGI In C

A few years back I wrote an article about writing CGI programs in C for Linux Journal. The text of my article remains online, but the code listings have long since gone by the wayside. From time to time i get requests for that code. I have attached the article, with code listings, below.

You'll also need to get libtemplate, my templating library, and the mysql client libraries.

If you're wondering why you should do something as crazy as write CGI programs in C, consider that a C program requires about 1/10th the server resources as a PHP script. Once you have your foundation libraries (primarily a CGI parser and a template engine), these programs are also fast to write.

AttachmentSize
cgiinc.pdf37.11 KB
ยป