--- libaitwww/example/test.c 2012/03/09 09:38:55 1.1 +++ libaitwww/example/test.c 2012/03/09 09:38:55 1.1.2.1 @@ -0,0 +1,34 @@ +#include +#include +#include + + +int +main() +{ + int i; + cgi_t *cgi; + + 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", cgigetvalue("something"), cgigetvalue("somethingelse")); + cginewquerystr("blaha=this is a string&blahb=this is another string"); + printf("\n%s\n%s\n", cgigetvalue("blaha"), cgigetvalue("blahb")); + + cgiclose(); + cginewquerystr("tmpa=another kool string&tmpb=and again"); + printf("\n%s\n%s\n", cgigetvalue("tmpa"), cgigetvalue("tmpb")); + i=mail("John-Mark Gurney ", "John-Mark Gurney ", "Test", "this is a test, $tmpa and other junk $tmpb"); + */ + + www_closeCGI(&cgi); + return 0; +}