/* akcija.c - Primer CGI-programa */
#include <stdio.h>
#include <string.h>
int main (int barg, char *varg[]) {
int zn, i;
printf ("Content-Type: text/html\n\n\n");
printf ("<HTML>"
"<HEAD><TITLE>Primljeni podaci</TITLE></HEAD>"
"<BODY>"
"<H1>Primljeni podaci</H1>");
printf ("<H2>Argumenti</H2>"); pos=0;
for (i=0; i<barg; printf ("%s<BR>", varg[i++]);
printf ("<H2>Glavni ulaz</H2><CODE>"); pos=0;
for (i=1; (zn=gtechar())!=EOF; i++) {
putchar (zn); if (i % 60 == 0) printf ('<BR>');
}
printf ("</CODE></BODY></HTML>");
return 0;
}
Copyright © 1998, Laslo Kraus
Poslednja revizija: 13.6.1998.