#include #include #include #include #include #include main() { int x,y,z; char s[1024]; char buf[20000]; x=0; printf("Content-type: text/plain\n\n"); strcpy(s,getenv("CONTENT_LENGTH")); printf("Content Length: %s\n",s); fgets(buf,20000,stdin); while(!feof(stdin) && x < 3) { printf("%s",buf); fgets(buf,20000,stdin); x++; } close(stdin); close(stdout); }