Showing IP address of a user...

Gerhard Häring gh at ghaering.de
Wed Jul 30 00:43:59 CEST 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