Showing IP address of a user...

Gerhard Häring gh at ghaering.de
Tue Jul 29 18:43:59 EDT 2003


Fazer wrote:
> Hello,
> 
> I was wondering how I can show an IP address of a person who visits a
> Python web-page?  Would I have to use Environment variables to access
> Apache's server variables which hold such values like in PHP or what?

Use this little CGI script to find the answer to your question:

#!/usr/bin/env python
import cgi
cgi.test()

-- Gerhard





More information about the Python-list mailing list