"Alvin A. Delagon" <[EMAIL PROTECTED]> writes: > I have a python cgi script running behind a CGI server which is also > built using python using CGIHTTPServer module. How can my cgi script > obtain the remote ip address?
The CGI specification lists a number of environment variables that are set for the scrit receiving the request. The one you want is REMOTE_ADDR, and possibly REMOTE_HOST. <URL:http://hoohoo.ncsa.uiuc.edu/cgi/env.html> Python makes environment variables available via the 'os.environ' map. <URL:http://docs.python.org/lib/os-procinfo.html> -- \ "I cannot conceive that anybody will require multiplications at | `\ the rate of 40,000 or even 4,000 per hour ..." -- F. H. Wales | _o__) (1936) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list