#include #include #include int main() { int ret; cgi_t *cgi, *cgi1; putenv("QUERY_STRING=test1=abra+kadabra&testche=piuk%20mdaa"); putenv("CONENT_LENGTH=390"); putenv("REQUEST_METHOD=GET"); cgi = www_initCGI(); if (!cgi) { printf("Error:: #%d - %s\n", www_GetErrno(), www_GetError()); return 1; } printf("%s\n%s\n", www_getValue(cgi, "testche"), www_getValue(cgi, "test1")); cgi1 = www_parseQuery("blahA=this is a string&blahB=this is another string"); if (!cgi1) { printf("Error:: #%d - %s\n", www_GetErrno(), www_GetError()); www_closeCGI(&cgi); return 2; } printf("\n%s\n%s\n", www_getValue(cgi1, "blahA"), www_getValue(cgi1, "blahB")); www_closeCGI(&cgi); www_addValue(cgi1, "oho", "boho"); printf("\n%s\n", www_getValue(cgi1, "oho")); www_delPair(cgi1, "oho"); printf("\n%s\n", www_getValue(cgi1, "oho")); www_delPair(cgi1, "oho"); www_closeCGI(&cgi1); return 0; }