#!/usr/bin/perl # Simple example of CGI script. print "Content-type: text/html\r\n"; # The first line must specify content type print "\r\n"; # A blank line ends the headers # From now on everything goes to the client print "\n"; print "\n"; print " \n"; print " WN Executable Program Example -- Results\n"; print " \n"; print "\n"; print " \n"; print "

Here are some standard CGI environment variables:

\n"; print "\n"; print "

\n"; print " PATH_INFO = $ENV{PATH_INFO}
\n"; print " AUTH_TYPE = $ENV{AUTH_TYPE}
\n"; print " SERVER_SOFTWARE = $ENV{SERVER_SOFTWARE}
\n"; print " SERVER_NAME = $ENV{SERVER_NAME}
\n"; print " SERVER_PROTOCOL = $ENV{SERVER_PROTOCOL}
\n"; print " SERVER_PORT = $ENV{SERVER_PORT}
\n"; print " HTTP_ACCEPT = $ENV{HTTP_ACCEPT}
\n"; print " HTTP_ACCEPT_CHARSET = $ENV{HTTP_ACCEPT_CHARSET}
\n"; print " HTTP_ACCEPT_LANGUAGE = $ENV{HTTP_ACCEPT_LANGUAGE}
\n"; print " HTTP_RANGE = $ENV{HTTP_RANGE}
\n"; print " HTTP_REFERER = $ENV{HTTP_REFERER}
\n"; print " HTTP_USER_AGENT = $ENV{HTTP_USER_AGENT}
\n"; print " HTTP_FROM = $ENV{HTTP_FROM}
\n"; print " HTTP_HOST = $ENV{HTTP_HOST}
\n"; print " HTTP_COOKIE = $ENV{HTTP_COOKIE}
\n"; print " PATH_TRANSLATED = $ENV{PATH_TRANSLATED}
\n"; print " SCRIPT_NAME = $ENV{SCRIPT_NAME}
\n"; print " SCRIPT_FILENAME = $ENV{SCRIPT_FILENAME}
\n"; print " QUERY_STRING = $ENV{QUERY_STRING}
\n"; print " REMOTE_HOST = $ENV{REMOTE_HOST}
\n"; print " REMOTE_ADDR = $ENV{REMOTE_ADDR}
\n"; print " REQUEST_METHOD = $ENV{REQUEST_METHOD}
\n"; print "

\n"; print "\n"; print "

Non-CGI variables provided by the WN server:

\n"; print "\n"; print "

\n"; print " URL_SCHEME = $ENV{URL_SCHEME}
\n"; print " DOCUMENT_ROOT = $ENV{DOCUMENT_ROOT}
\n"; print " WN_DIR_PATH = $ENV{WN_DIR_PATH}
\n"; print " HTTP_POST_FILE = $ENV{HTTP_POST_FILE}
\n"; print " HTTP_PUT_FILE = $ENV{HTTP_POST_FILE}
\n"; print "

\n"; print " \n"; print "\n"; exit(0);