added html page for Mozilla user agents
authorDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 29 Aug 2017 13:30:01 +0000 (15:30 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 29 Aug 2017 13:30:01 +0000 (15:30 +0200)
temp2.sh

index 3ffd76d..a8049f8 100755 (executable)
--- a/temp2.sh
+++ b/temp2.sh
@@ -43,6 +43,22 @@ fi
 
 set > /dev/shm/temp2.cgi.vars
 
+if echo $HTTP_USER_AGENT | grep Mozilla > /dev/null ; then
+       echo "Content-type: text/html\r\n\r\n"
+       cat << __HTML__
+<body>
+<form method="get" action="/temp2.sh" style="position: fixed; top: 0; right: 0">
+<input type=submit name="t" value="48h">
+<input type=submit name="t" value="24h">
+<input type=submit name="t" value="6h">
+<input type=submit name="t" value="1h">
+</form>
+<img src="/temp2.png">
+</body>
+__HTML__
+       exit 0
+fi
+
 echo "Location: $REQUEST_SCHEME://$SERVER_NAME:$SERVER_PORT/temp2$GRAY.png"
 echo