topical media & game development
lib-ch-example-cgi-nobuffer.ch / ch
#!/bin/ch
/* Example Ch CGI program that displays
the time in plain ASCII text using system() call
*/
include<stdio.h>
int main() {
setbuf(stdout,NULL); /* turn off the I/O buffer so that output
will be printed out before system() call */
printf("Content-type: text/plain\n\n");
printf("REMOTE_HOST= \%s\n", getenv("REMOTE_HOST"));
system("/usr/bin/date");
}
(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.