Re: Get External IP Address

2008-10-17 Thread Dj Gilcrease
request.META.get('REMOTE_ADDR') Dj Gilcrease OpenRPG Developer ~~http://www.openrpg.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@google

Re: Get External IP Address

2008-10-17 Thread Jeff Johnson
I stumbled on this a while back. It may only work on Linux because of the fcntl. import socket import fcntl import struct def get_ip_address(ifname): s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) return socket.inet_ntoa(fcntl.ioctl( s.fileno(), 0x8915, # SIO

Re: Get External IP Address

2008-10-17 Thread Jeff Anderson
Ty wrote: > I'd like to grab the users external IP address. I'm using it for a > spam catching class that I'm porting over to Django/Python. Is this > possible? > > This person outlines how to 'hack' it, but I'd rather not depend on an > external site. > http://dmiessler.com/blog/how-to-use-python-

Get External IP Address

2008-10-17 Thread Ty
I'd like to grab the users external IP address. I'm using it for a spam catching class that I'm porting over to Django/Python. Is this possible? This person outlines how to 'hack' it, but I'd rather not depend on an external site. http://dmiessler.com/blog/how-to-use-python-to-get-your-external-i