1个回答
展开全部
import httplib
import urllib
Conn = httplib.HTTPConnection("113.251.220.147")
Conn.request("GET", "/lesson@8.20/index.php")
response = Conn.getresponse()
response.read()
headers = {'Connection':'Keep-Alive', 'Content-Type':'application/x-www-form-urlencoded; charset=UTF-8'}
data = urllib.urlencode({"username":"Joe", "password":"123456","remember":"false"})
Conn.request("POST", "/lesson@8.20/check.php" ,data,headers)
response = Conn.getresponse()
x =response.read()
print x
我用的python2,测试ok
追问
我是3.3....
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询