Showing IP address of a user...
Irmen de Jong
irmen at -NOSPAM-REMOVETHIS-xs4all.nl
Tue Jul 29 18:07:32 EDT 2003
Jeremy Yallop wrote:
> os.environ['REMOTE_ADDR']
Ofcourse, this is only available when you're in a CGI-like
environment. When running inside mod_python, or something
else, I doubt that this environment variable is available.
In those cases, there is usually a specific way of obtaining
the client's address, either directly or via the socket
that represents the network connection. But this depends
on what you're running!
--Irmen
More information about the Python-list
mailing list