home *** CD-ROM | disk | FTP | other *** search
/ The Net: Ultimate Internet Guide / WWLCD1.ISO / pc / frntpage.sdk / cgi / hello / hello.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-05-31  |  507 b   |  27 lines

  1.  
  2. /* hello.c: a minimal stdio CGI program */
  3.  
  4. #include <stdio.h>
  5.  
  6. int main (argc, argv) 
  7.     int argc;
  8.     char *argv[];
  9. {
  10.     /* 
  11.         IMPORTANT: always output the MIME header(s) first, 
  12.         terminated by two newlines 
  13.     */
  14.     printf("Content-type: text/html\n\n");
  15.  
  16.     printf("<HTML>\n");
  17.     printf("<HEAD>\n");
  18.     printf("<TITLE>Hello, CGI World!</TITLE>\n");
  19.     printf("</HEAD>\n");
  20.     printf("<BODY>\n");
  21.     printf("<H1>Hello, CGI World!</H1>\n");
  22.     printf("</BODY>\n");
  23.     printf("</HTML>\n");
  24.  
  25.     return 0;
  26. }
  27.