1 #include "fcgi_stdio.h" /* fcgi library; put it first*/
4 int main (int argc, char *argv[])
8 //Spawn thread to get sensor data here?
10 while (FCGI_Accept() >= 0) {
11 printf("Content-type: text/html\r\n"
13 "<title>FastCGI Hello! (C, fcgi_stdio library)</title>"
14 "<h1>FastCGI Hello! (C, fcgi_stdio library)</h1>"
15 "Request number %d running on host <i>%s</i>\n",
16 count++, getenv("SERVER_HOSTNAME"));
18 char *data = getenv("QUERY_STRING");
20 printf("<br>Query string is: '%s'\n", data);