[Zope] Translate IP to domain?

Dennis Allison allison at sumeru.stanford.EDU
Wed Aug 27 16:54:03 EDT 2003


An External method --

   import socket
   def gethostbyname(self, ipaddress ):
        return socket.gethostbyaddr( ipaddress )[0]

(untested) ought to do it.



On Wed, 27 Aug 2003, Marc Burgauer wrote:

> Hi
> 
> For marketing reasons, we would like to be able to resolve the IP address of
> users filling in a web form to their domain name.
> 
> Is there a Zope product or a python library that allows me to do on the fly
> IP-to-domain conversion? If the address can not be resolved, I'd like to
> "keep" the IP address in the result.
> 
> Zope 2.3 (soon moving to 2.6)
> Solaris (intel)
> 
> NO Apache yet, but maybe in the future!
> 
> Cheers
> 
> Marc
> 
> 
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
> 




More information about the Zope mailing list