PyS60通过WAP代理上网
以下为示例代码:
import httplib, urllib
params = urllib.urlencode({'username':usr, 'password':pwd})
headers = {"Content-type":"application/x-www-form-urlencoded","X-Online-Host":HOST}
conn = httplib.HTTPConnection("10.0.0.172:80") #中国移动WAP代理地址
conn.request("POST", PAGE, params, headers)
response = conn.getresponse()
conn.close()