Newbie Q: CGI

Jordan Katz webmaster at underlevel.net
Thu Jun 8 00:28:08 EDT 2000


"Steven Adams" <adams_s at lab.eng.usyd.edu.au> writes:

> Hi,
> 
> How do you get the IP number from a request for a web page? gethostbyname()
> and gethostbyaddress() weren't mentioned anywhere in the cgi module docs
> (that I could see, did I miss it?)

The low-level socket module has what you need.  You can read all about
it at http://www.python.org/doc/current/lib/module-socket.html
-- 
Jordan Katz <webmaster at underlevel.net>



More information about the Python-list mailing list