Newbie Q: CGI

Steven Adams adams_s at lab.eng.usyd.edu.au
Fri Jun 9 00:42:24 EDT 2000


Thanks Jordan, I'd already looked through socket (for another project) but I
didn't think I'd need (or want) to use socket,
all the IP was needed for was part of a simple HTML message board/discussion
system I was writing, and I neede the IP of who was sending the message.

thanks anyways :-)

Steven - annoyed that Perl seemed to provide an easier way to do it...


Jordan Katz <webmaster at underlevel.net> wrote in message
news:m3snuobxuv.fsf at underlevel.underlevel.net...
> "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