这样行不行:- Set Http = CreateObject("WinHttp.WinHttpRequest.5.1")
- MsgBox HttpGET("http://www.baidu.com/")
-
- Function HttpGET(URL)
- Http.Open "GET", URL, False
- Http.Send()
- Http.ResponseText()
- With CreateObject("adodb.stream")
- .mode=3
- .type=2
- .charset="utf-8"
- .open
- .writeText(Http.ResponseText())
- .position=0
- .charset="gb2312"
- HttpGET=.readText()
- .close
- End With
- End Function
复制代码
|