Get Cliet IP Address

2009-08-02 Thread Fred Atkinson
What is the function to obtain the client browser's IP address? Fred -- http://mail.python.org/mailman/listinfo/python-list

Re: Get Cliet IP Address

2009-08-02 Thread Piet van Oostrum
> Fred Atkinson (FA) wrote: >FA>What is the function to obtain the client browser's IP >FA> address? You mean in a web server? The following should work (and was posted by me not long ago): from os import getenv ip = (getenv("HTTP_CLIENT_IP") or getenv("HTTP_X_FORWARDED_FOR")

Re: Get Cliet IP Address

2009-08-02 Thread eliasf
"Fred Atkinson" wrote: What is the function to obtain the client browser's IP address? Do you mean the external public IP to the Internet? When I wanted to log the dynamic IP that my ADSL connection gets, I used whatismyip.com like this: import urllib2 QUERY_URL = 'http://www.whatismy