Lightweight CGI Library

Use of the CGI Library

This library provides a very simple interface to CGI programming in C. It is meant to support programs that communicate with the web user via HTML forms and GET variables.

Basically, you'll need to add the following code to your programs.

Introduce CGI library:

   #include <cgi.h>

   s_cgi *cgi;
   cgi = cgiInit();

Fetch the value of a FORM-variable:

   name = cgiGetValue (cgi, "name");

Fetch the temporary filename of an uploaded file:

   file = cgiGetFile (cgi, "name");

Fetch the value of a cookie:

   cookie = cgiGetCookie (cgi, "cookie-name");

Set a cookie yourself:

   cgiSetHeader ("Set-Cookie", "Version=1; name=value; Path=/");

 

News
2008-04-06 Version 0.6 released more2001-01-02 Web pages for this project more1999-08-20 Version 0.5 released more

Download
Version 0.6 (24 kB)
Version 0.5 (13 kB)
Version 0.4 (8 kB)
Version 0.3 (10 kB)

Contributors
Martin Schulze
Miguel Freitas
Mikko Torni
Neal H. Walfield
Neil Spring