Rich Simms DM160C Exercise 3

Server Side Includes

Home Exercise Students Forum

Display Web Server Environment Variables

UNIQUE_ID=WVTxa9BxmekAAHsADqMAAAAI
no-gzip=1
SCRIPT_URL=/dm160c/exercise-03.shtml
SCRIPT_URI=http://www.hayrocket.com/dm160c/exercise-03.shtml
dsid=4206674
ds_id_4206674=
DH_USER=rsimms
HTTP_HOST=www.hayrocket.com
HTTP_ACCEPT_ENCODING=x-gzip, gzip, deflate
HTTP_USER_AGENT=CCBot/2.0 (http://commoncrawl.org/faq/)
HTTP_ACCEPT=text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
PATH=/bin:/usr/bin:/sbin:/usr/sbin
SERVER_SIGNATURE=
SERVER_SOFTWARE=Apache
SERVER_NAME=www.hayrocket.com
SERVER_ADDR=208.113.154.64
SERVER_PORT=80
REMOTE_ADDR=54.80.21.61
DOCUMENT_ROOT=/home/rsimms/hayrocket.com
SERVER_ADMIN=webmaster@hayrocket.com
SCRIPT_FILENAME=/home/rsimms/hayrocket.com/dm160c/exercise-03.shtml
REMOTE_PORT=56112
GATEWAY_INTERFACE=CGI/1.1
SERVER_PROTOCOL=HTTP/1.0
REQUEST_METHOD=GET
QUERY_STRING=
REQUEST_URI=/dm160c/exercise-03.shtml
SCRIPT_NAME=/dm160c/exercise-03.shtml
DATE_LOCAL=05
DATE_GMT=12
LAST_MODIFIED=16
DOCUMENT_URI=/dm160c/exercise-03.shtml
USER_NAME=rsimms
DOCUMENT_NAME=exercise-03.shtml

Date last modified

Back button

HTTP_REFERER is (none)
Back arrow

Displaying environment variables

Today was rough. We hiked for hours through mud, fog and mosquitos. At the arranged time and place we encountered the secret agent who went by the code name CCBot/2.0 (http://commoncrawl.org/faq/). He gave us directions to /dm160c/exercise-03.shtml. However, the actual address, 54.80.21.61, was firewalled. With some encourgement he finally told us about the exercise-03.shtml document. This document, that had been the cause of so much trouble, was buried behind a sign that said /dm160c/exercise-03.shtml.

Conditionals

Use the browser Refresh button to rotate through a set of five photes. The photo displayed below is tied to the first digit of the seconds field of the current time. For example if the time (HH:MM:SS) is 12:45:02 then the seconds field is 02 and the temple photo is displayed. This is done using cascaded if statements (if, elif and else). The photos are a temple (SS=00-09), carhenge (SS=10-19), fountain (SS=20-29), castle (SS=30-39), leftbank (SS=40-49) and kitchen (SS=50-59).

Carhenge

Seconds=11 (click Refresh to change)

Valid XHTML 1.0 Strict    Valid CSS!


This page served up by: Apache