#!/bin/sh
# usage: forwardurl URL TIME [MESSAGE]

TIME=0
[ "$2" ] && TIME=$2

if [ -n "`echo -e`" ]; then
	E=
else
	E=-e
fi

echo $E "Cache-Control: no-cache\r
Pragma: no-cache\r
Expires: Thu, 01 Dec 1994 16:00:00 GMT\r
Content-Type: text/html\r
\r
<html>\r
  <head>\r
    <meta http-equiv=\"refresh\"\r
          content=\"$TIME;URL=$1\">\r
  </head>\r
  <body>\r
    $3\r
  </body>\r
</html>\r
\r"
