Lightweight CGI LibraryUse of the CGI LibraryThis 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=/");
|
|