6
如何发送POST请求?
我在网上找到了这个脚本: import httplib, urllib params = urllib.urlencode({'number': 12524, 'type': 'issue', 'action': 'show'}) headers = {"Content-type": "application/x-www-form-urlencoded", "Accept": "text/plain"} conn = httplib.HTTPConnection("bugs.python.org") conn.request("POST", "", params, headers) response = conn.getresponse() print response.status, response.reason 302 Found data = response.read() data 'Redirecting to <a href="http://bugs.python.org/issue12524">http://bugs.python.org/issue12524</a>' conn.close() 但是我不明白如何在PHP中使用它,或者params变量中的所有内容是什么,或者如何使用它。在尝试使它正常工作时,请给我一点帮助吗?