topical media & game development
lib-ch-example-sample-webplot1.cgi / cgi
#!/bin/ch
include <cgi.h>
int main() {
int i, num;
chstrarray name, value;
class CResponse Response;
class CRequest Request;
class CServer Server;
num = Request.getFormNameValue(name, value);
Response.setContentType("text/html");
Response.begin();
Response.title("Web Plot");
printf("<center>\n");
printf("<img src=\"lib-ch-example-sample-webplot2.cgi");
for (i=0; i<num; i++){
putc(i == 0 ? '?' : '&', stdout);
fputs(Server.URLEncode(name[i]),stdout);
putc('=', stdout);
fputs(Server.URLEncode(value[i]),stdout);
}
printf("\">\n");
printf("</center>\n");
Response.end();
}
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.