Lightweight CGI Library

Use of the CGI Library

This library is intend to provide an easy interface to CGI programming for the Free Software Community. Please see how easy it is to work with CGI.

To use this library you need to include the cgi.h include file with the following command into your C programs:

   #include <cgi.h>

Additionally you'll have to add the library libcgi.a to the linker, either by modifying LDFLAGS in your makefiles or by adding `-lcgi' to the appropriate commandline.

   #include <cgi.h>

   s_cgi *cgiArg;

   void main()
   {
       char *url;
       char *server_url = NULL;

       cgiArg = cgiInit ();

       server_url = getenv("SERVER_URL");
       if ((url = cgiGetValue(cgiArg, "url")) == NULL) {
           if (server_url)
               cgiRedirect(server_url);
           else
               cgiRedirect("/");
       } else
           cgiRedirect(url);
   }

 

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
Neal H. Walfield
Stephen Uitti
Laszlo Zavaleta
Neil Spring