Scroll to navigation

rudecgi(3) User Manuals rudecgi(3)

NAME

rudecgi - access formdata in CGI applications

SYNOPSIS

#include <rude/cgi.h>
rude::CGI CGI();
static void finish();
void setCaseSensitive(bool isCaseSensitive);
int numValues() const;
const char *fieldnameAt(int position) const;
bool exists(const char *fieldname) const;
std::ostream& operator<<(std::ostream& os,const CGI& cgi);

DESCRIPTION

The RudeCGI library is used to access formdata within C++ CGI applications.

EXAMPLES

Examples, how-to's and tutorials can also be found at the rudeserver.com website
Basic Usage
#include <rude/cgi.h> #include <iostream>
using namespace std; using namespace rude;
int main(void) {
// Obtain the cgi instance
//
CGI cgi;

// Print out standard CGI HTTP Response header
//
cout << "Content-Type: text/html0;

// Print out HTML
//
cout << "<html><body>"
<< "You selected the color: " ;

// use the cgi object to obtain form data
//
cout << cgi["color"];

cout << "</body></html>";

return 0; }

SEE ALSO

rudeconfig(3), rudedatabase(3), rudesocket(3), rudesession(3)

REPORTING PROBLEMS

Before reporting a problem, please check the rudeserver.com web site to verify that you have the latest version of rudecgi; otherwise, obtain the latest version and see if the problem still exists. Please read the FAQ at:

http://www.rudeserver.com/
before asking for help. Send questions and/or comments to matt@rudeserver.com

AUTHORS

Copyright (C) 2000 Matthew Flood (matt@rudeserver.com)
This software is provided "as-is," without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. See the distribution directory with respect to requirements governing redistribution. Thanks to all the people who reported problems and suggested various improvements in rudecgi; who are too numerous to cite here.
January 11, 2006 Version 4.1.1