home *** CD-ROM | disk | FTP | other *** search
/ The HTML Web Publisher's Construction Kit / HTMLWPCK.ISO / unix / cgi / c_src / url_enc.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-27  |  365 b   |  23 lines

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #define LF 10
  4. void main(int argc, char *argv[])
  5. {
  6.  
  7.        int cont_len,index;
  8.        char c;
  9.  
  10.        cont_len = atoi(getenv("CONTENT_LENGTH"));
  11.  
  12.        printf("Content-type: text/html%c%c",LF,LF);
  13.        printf("<listing>\n");
  14.    for(index=0;index<cont_len;index++)
  15.    {
  16.        c = getchar();
  17.        printf("%c",c);
  18.    }
  19. }
  20.  
  21.  
  22.  
  23.