#!/bin/sh case "$REQUEST_METHOD" in GET) if test -z "$QUERY_STRING" ; then cat << EOF Content-type: text/xml $SERVER_NAME $SERVER_SOFTWARE $SERVER_PROTOCOL $SERVER_PORT $SERVER_SIGNATURE $REMOTE_ADDR $REMOTE_HOST $REMOTE_PORT $HTTP_USER_AGENT $HTTP_REFFERER $HTTP_REQUEST $DOCUMENT_ROOT $REQUEST_TIME EOF else URL=`/usr/local/bin/unescape $QUERY_STRING` wget "$URL" -q -O /tmp/wget$$ >/tmp/wg echo "Content-type: text/xml" echo cat /tmp/wget$$ rm /tmp/wget$$ fi ;; esac