topical media & game development
lib-ch-example-ref-wcgi-getServerVariable.cgi / cgi
#!/bin/ch
/* Copyright (c) 2001 by SoftIntegration, Inc. All Rights Reserved */
include <stdio.h>
include <wcgi.h>
int main() {
class CResponse Response;
class CRequest Request;
chchar *value, *name;
Response.begin();
Response.title(L"The Result of Test of Request.getServerVariable");
printf("<H1> The Result of Test of Request.getServerVariable</H1>
\n");
name = Request.getForm(L"serverVariable");
printf("The name of Server Variable is : ");
if (name != NULL)
{
fputws(name, stdout);
printf(" <br>\n");
printf("The value of Server Variable is : ");
value = Request.getServerVariable(name);
if (value !=NULL) {
fputws(value, stdout);
printf(" <br>\n");
}
else
printf("NULL <br>\n");
}
else
printf("NULL <p>\n");
Response.end();
}
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.