LJ Archive

Listing 1. Count to Ten

printf("HTTP/1.0 200 Okay\n"

"Content-;Type: multipart/x-;mixed-;replace;"

"boundary=SoMeRaNdOmTeXt\n"

"\n-SoMeRaNdOmTeXt\n");

for (Count = 1; Count <= 10; Count++) {

printf("Content-type: text/html\n\n<HTML><HEAD><HEAD>"

   "<BODY><H3>Update #%d</H3></BODY></HTML>\n"

   "\n-SoMeRaNdOmTeXt\n", Count);

fflush(stdout);

sleep(1);

} /* end for */

printf("Content-type: text/html\n\n<HTML><HEAD></HEAD>"

   "<BODY><H3>That's all kids!</H3></BODY></HTML>\n");

fflush(stdout);
LJ Archive