HELP urllib POST can't get it to work

mike mcleod mike.mcleod at bt.com
Fri Mar 30 05:11:28 EST 2001


My code:

import urllib
params = urllib.urlencode({'address': '07', 'identity': 'me',
                           'resultpg':'html/sendresult.html', 'message':
'test',
                           'fPage':'true',
                           })
f = urllib.urlopen("http://www.samemachine.uk/bin/afunc.pl?", params)
print f.read()

It looks like the order of the params come out different in the urlopen.
But because the server will only accept in the order shown it fails.
I have tried to do this using basic sockets but don't know how to get that
work without lots of reading.

Help please.
Mike McLeod.
My thoughts only....







More information about the Python-list mailing list