Annotation of libaitwww/example/test.c, revision 1.1.2.1
1.1.2.1 ! misho 1: #include <stdio.h>
! 2: #include <stdlib.h>
! 3: #include <aitwww.h>
! 4:
! 5:
! 6: int
! 7: main()
! 8: {
! 9: int i;
! 10: cgi_t *cgi;
! 11:
! 12: putenv("QUERY_STRING=test1=abra+kadabra&testche=piuk%20mdaa");
! 13: putenv("CONENT_LENGTH=390");
! 14: putenv("REQUEST_METHOD=GET");
! 15: cgi = www_initCGI();
! 16: if (!cgi) {
! 17: printf("Error:: #%d - %s\n", www_GetErrno(), www_GetError());
! 18: return 1;
! 19: }
! 20:
! 21: /*
! 22: printf("%s\n%s\n", cgigetvalue("something"), cgigetvalue("somethingelse"));
! 23: cginewquerystr("blaha=this is a string&blahb=this is another string");
! 24: printf("\n%s\n%s\n", cgigetvalue("blaha"), cgigetvalue("blahb"));
! 25:
! 26: cgiclose();
! 27: cginewquerystr("tmpa=another kool string&tmpb=and again");
! 28: printf("\n%s\n%s\n", cgigetvalue("tmpa"), cgigetvalue("tmpb"));
! 29: i=mail("John-Mark Gurney <gurney_j@resnet.uoregon.edu>", "John-Mark Gurney <gurney_j@localhost>", "Test", "this is a test, $tmpa and other junk $tmpb");
! 30: */
! 31:
! 32: www_closeCGI(&cgi);
! 33: return 0;
! 34: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>