Python thinks I'm a different IP

Posted by Yongho on Stack Overflow See other posts from Stack Overflow or by Yongho
Published on 2010-04-13T14:34:34Z Indexed on 2010/04/13 14:43 UTC
Read the original article Hit count: 305

Filed under:
|

I'm trying to set a page that displays the visitor's IP. All the methods I have tried show an IP different from the IP my computer has. I've tried:

  1. Looking up http://www.whatismyip.com/automation/n09230945.asp

  2. Using socket.getaddrinfo(socket.gethostname(), None)[0][4][0]

How can I find the real IP of the visitor?

© Stack Overflow or respective owner

Related posts about python

Related posts about ip