Off-topic Internet Question
Aahz Maruch
aahz at netcom.com
Wed Oct 13 11:42:58 EDT 1999
In article <3804977B.86446175 at strs.co.uk>,
Ian Clarke <I.Clarke at strs.co.uk> wrote:
>
>Yes, it can be done. The Python script will need to pretend that it is
>a web browser and submit the form information as a "cgi" request to the
>web server on which the internet page resides. It can do this by
>opening a TCP socket to the web server. You should read up on the HTTP
>protocol (specifically the section on CGI) (and using sockets in
>Python). You will need to determine whether the web page in question
>uses CGI GET or CGI POST. CGI GET is easier to implement as you just
>request a page appending the parameters to the end of the URL. CGI POST
>is a little more involved.
No, it isn't, if you're using urllib:
urllib.urlopen('http://www.foo.com/script', 'bar=baz')
--
--- Aahz (@netcom.com)
Androgynous poly kinky vanilla queer het <*> http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6 (if you want to know, do some research)
More information about the Python-list
mailing list