IP address of webserver

Paul Rubin http
Sat Jan 27 13:26:41 EST 2007


"Johny" <python at hope.cz> writes:
> So I know  that www.google.com has 209.85.129.147  IP address.
> But how can I find it directly from Python script?

>>> import socket
>>> print socket.gethostbyname('www.google.com')
66.102.7.147
>>> 



More information about the Python-list mailing list