CGI and client's IP?

Gerhard Häring gh_pythonlist at gmx.de
Mon Apr 29 06:25:13 EDT 2002


* Fernando Rodríguez <frr at easyjob.net> [2002-04-29 11:58 +0200]:
> Can I get the client's IP froma a cgi script? O:-)
 
This might do it: os.environ["REMOTE_ADDR"]

It's instructive to look at the output of this little CGI script:

import cgi
cgi.test()

Gerhard
-- 
This sig powered by Python!
Außentemperatur in München: 12.7 °C      Wind: 3.9 m/s





More information about the Python-list mailing list