write a cgi program that displays a count of how


Write a CGI program that displays a count of how many times a browser on each computer has contacted the server.

echo Content -type: text /html

echo

N=$QUERY_STRING

Echo "< HTML >"

Case "x$N" in

x) N = 1

Echo "This is the initial page.< BR >< BR >"

; ;

X[0-9]*) N = 'expr$n + 1'

Echo "you have displayed this page $N times.< BR >< BR >

; ;

*) echo "The URL you used is inval id < /HTML >"

exi t 0

; ;

esac

echo "< A HREF=\ht tp: / /$SERVER_NAME$SCRIPT_NAME?$N\ >"

echo " Click here to refresh the page. < / A>"

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: write a cgi program that displays a count of how
Reference No:- TGS0283152

Expected delivery within 24 Hours