/* * tiny-fcgi2.c -- * * FastCGI example program using fcgiapp 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-fcgi2.c,v 1.7.26.1 1997/03/20 22:23:22 snapper Exp $"; #endif /* not lint */ #include "fcgiapp.h" #ifdef _WIN32 #include #endif void main(void) { FCGX_Stream *in, *out, *err; FCGX_ParamArray envp; int count = 0; while(FCGX_Accept(&in, &out, &err, &envp) >= 0) FCGX_FPrintF(out, "Content-type: text/html\r\n" "\r\n" "FastCGI Hello! (C, fcgiapp library)" "

FastCGI Hello! (C, fcgiapp library)

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