HTTP_USER_AGENT), what document referred them to the document they
are requesting (HTTP_REFERER), and what host the user is requesting
from (REMOTE_HOST). While there is no one single list that
contains all of the environment variables that are set, a
somewhat complete list
exists in the CGI documentation
at NCSA.
This CGI will show you what environment variables are set when you access our server.
ZD-Environment whose value is the name of the environment
variable you would like returned.
For Example,
<INPUT TYPE=hidden NAME=ZD-Environment VALUE="REMOTE_HOST">will notify Zot-Dispatch to get the value of the REMOTE_HOST environment variable. Pressing the
See Evironment Variable button below will
submit the following form which returns the value of the
REMOTE_HOST environment variable that is set when Zot-Dispatch is
run. Use the "back" command to return to this document if your client has one.
<FORM METHOD=POST ACTION="http://www.oac.uci.edu/cgi-bin/zd-2.0.cgi">
<INPUT TYPE=hidden NAME=ZD-Method VALUE="ZD-Reflect;;">
<INPUT TYPE=hidden NAME=ZD-Environment VALUE="REMOTE_HOST">
<INPUT TYPE=submit VALUE="See Environment Variable">
</FORM>
ZD-Environment input element to be included in a template,
rather than place $ZD-Environment# within your template,
use $Environment-Variable-Name# where
Environment-Variable-Name is the name of an environment variable
that has been specified within a ZD-Environment input element.
Example:
Let's say you want to reflect to the user, a document which tells them which
host they are accessing from. The form below shows an example of how you could
do such a thing.
<FORM METHOD=POST ACTION="http://www.oac.uci.edu/cgi-bin/zd-2.0.cgi">
<INPUT TYPE=hidden NAME=ZD-Environment VALUE="REMOTE_HOST">
<INPUT TYPE=hidden NAME=ZD-Method VALUE="ZD-Reflect;;body:<HTML>
<HEAD>
<TITLE>Zot-Dispatch: Environment Variable Example</TITLE>
</HEAD>
<BODY>
<H1>REMOTE_HOST Example</H1>
You have connected from the host $REMOTE_HOST#.
<HR>
<A HREF="http://www.oac.uci.edu/X/W6/zd/2.0/ZD-2.0-Environment.html#REMOTE">
Return to the Environment Variable Document</A>
</BODY>
</HTML>
">
<INPUT TYPE=submit VALUE="See Your Hostname">
</FORM>
Notice that REMOTE_HOST is specified in a ZD-Environment input
element and that it is substituted into the template using $REMOTE_HOST#.
Go ahead and try it out.
lmegliol@uci.edu)