1,502
社区成员
发帖
与我相关
我的任务
分享
Function gethtm(ByVal url As String) As String
With CreateObject("MSXML2.ServerXMLHTTP")
.setProxy 2, "59.38.125.124", "80"
.setTimeouts 10000, 10000, 10000, 10000
.Open "get", url, True
.send
While .readyState <> 4
DoEvents
Wend
gethtm = .responseText
End With
End Function
Private Sub Command1_Click()
Debug.Print gethtm("http://www.baidu.com")
End Sub
Const HTTPREQUEST_PROXYSETTING_PROXY = 2
Function gethtm(ByVal url As String) As String
With CreateObject("MSXML2.ServerXMLHTTP.5.0")
.SetProxy 2, "125.39.171.194:81"
.setTimeouts 10000, 10000, 10000, 10000
.Open "get", url, False
.send
While .readyState <> 4
DoEvents
Wend
gethtm = .responseText
End With
End Function
Private Sub Command1_Click()
Debug.Print gethtm("http://www.baidu.com")
End Sub