/* * tiny-fcgi.c -- * * FastCGI example program using fcgi_stdio library * * * Copyright (c) 1996 Open Market, Inc. * * See the file "LICENSE.TERMS" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * */ #ifndef lint static const char rcsid[] = "$Id: tiny-fcgi.c,v 1.6.26.1 1997/03/20 22:23:19 snapper Exp $"; #endif /* not lint */ #include "fcgi_stdio.h" #include #ifdef _WIN32 #include #endif void main(void) { int count = 0; while(FCGI_Accept() >= 0) { printf("Content-type: text/html\r\n" "\r\n" "FastCGI Hello! (C, fcgi_stdio library)" "

FastCGI Hello! (C, fcgi_stdio library)

" "Request number %d running on host %s " "Process ID: %d\n", ++count, getenv("SERVER_NAME"), getpid()); } }