import fcgi, os, sys, cgi count=0 while fcgi.isFCGI(): req = fcgi.Accept() count = count+1 req.out.write("Content-Type: text/html\n\n") req.out.write(""" """) req.out.write('\n' % ("Request counter", count)) names = req.env.keys() names.sort() cl = ('alt','normal') i= 0 for name in names: if not name.find("HTTP") or not name.find("REQUEST"): req.out.write('\n' % (cl[i%2], name, cgi.escape(`req.env[name]`))) i = i+1 req.out.write('
NameValue
%s%s
%s%s
\n\n') req.Finish()