Using httplib to read a file online
Fredrik Lundh
fredrik at pythonware.com
Tue Jun 14 12:15:17 EDT 2005
Oyvind Ostlund wrote:
> There is a server called noteme.com and a file called
> index.php on it, but why doesn't it work. If I changed
> it to 'vbforums.com' and 'index.php' then it worked.
server.putrequest('GET', filename) # send request andheaders
+ server.putheader('Host', servername) # identify server
server.putheader('Accept', 'text/html') # POST requests workhere too
server.endheaders() # as do cgi script file names
</F>
More information about the Python-list
mailing list