logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

rudecgi - access formdata in CGI applications

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.

Version 4.1.1                                   January 11, 2006                                      rudecgi(3)

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

       BasicUsage

       #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; }

Name

       rudecgi - access formdata in CGI applications

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

See Also

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

Synopsis

#include<rude/cgi.h>rude::CGICGI();staticvoidfinish();staticconstchar*version();staticvoidsetPathDelimiter(chardelimiter);staticvoidaddPathMapName(constchar*pathname);staticvoidsetPathMapVoid(constchar*emptyname);staticvoidparsePathMap(boolshouldParse);staticvoidparsePath(boolshouldParse);staticvoidparseCookies(boolshouldParse);staticvoidmaxPostLength(longbytes);voidsetCaseSensitive(boolisCaseSensitive);intnumValues()const;intnumValues(constchar*fieldname)const;constchar*fieldnameAt(intposition)const;boolexists(constchar*fieldname)const;boolisFile(intindex)const;boolisFile(constchar*fieldname)const;boolisFile(constchar*fieldname,intposition);constchar*datasource(intindex)const;constchar*datasource(constchar*fieldname)const;constchar*datasource(constchar*fieldname,intposition)const;constchar*operator[](constchar*fieldname);constchar*operator[](intx);constchar*value(intindex)const;constchar*value(constchar*fieldname)const;constchar*value(constchar*fieldname,intposition)const;constchar*length(intindex)const;constchar*length(constchar*fieldname)const;constchar*length(constchar*fieldname,intposition)const;constchar*contenttype(intindex)const;constchar*contenttype(constchar*fieldname)const;constchar*contenttype(constchar*fieldname,intposition)const;constchar*filename(intindex)const;constchar*filename(constchar*fieldname)const;constchar*filename(constchar*fieldname,intposition)const;constchar*filepath(intindex)const;constchar*filepath(constchar*fieldname)const;constchar*filepath(constchar*fieldname,intposition)const;std::ostream&operator<<(std::ostream&os,constCGI&cgi);

See Also