如果直接在IE地址栏输入:
http://192.168.1.23:8080/?numbers=10086&text=百度
则收到的是乱码
但在google浏览器输入上面的地址收到的正常
不可以修改接收端的程序.所以只能在提交上想办法解决
Dim url As String
Dim http As Object
url = http://192.168.1.23:8080/?numbers=10086&text=百度
http = CreateObject("MSXML2.XMLHTTP")
http.Open("get", url, False)
http.send()
MessageBox.Show("返回信息:" & http.responseText)
应该怎么做调整?
抓包分别得到的数据是这样的:
谷歌浏览器
GET /?numbers=10086&text=%E6%88%91%E6%98%AF%E4%BD%99%E4%B8%96%E5%85%A8 HTTP/1.1
Host: 192.168.1.23:8080
Connection: keep-alive
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31
Accept-Encoding: gzip,deflate,sdch
Accept-Language: zh-CN,zh;q=0.8
Accept-Charset: GBK,utf-8;q=0.7,*;q=0.3
IE浏览器
GET /?numbers=10086&text=.... HTTP/1.1
Accept: */*
Accept-Language: zh-cn
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; WOW64; Trident/6.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729)
Host: 192.168.1.23:8080
Connection: Keep-Alive
[此贴子已经被作者于2013-5-14 22:35:19编辑过]