VB 中 inet 控件问题
添加该控件后,Text1.Text=Inet1.OpenURL(http://wap.baidu.com)已经转码了的。如果我想要用代理IP去访问那个网址获得源码,而不是...
添加该控件后,Text1.Text = Inet1.OpenURL( http://wap.baidu.com)已经转码了的。如果我想要用代理IP去访问那个网址获得源码,而不是直接用本机IP,该怎么做?不手动设置IE的哦,得到答案再加分以免浪费了却没人回答,谢谢啦
展开
2013-12-12
展开全部
帮你加上注释吧,晕倒... On Error Resume Next '发生错误时继续下一步Inet1.AccessType = 2 '访问类型
Inet1.RequestTimeout = 60 '请求超时
Inet1.Proxy = "HTTP=" & "59.74.42.152" & ":" & "8080" '代理
Inet1.OpenURL (" http://www.baidu.com/") '打开的网址
MsgBox Val(Mid(Trim(Inet1.GetHeader), 10, 3))
If Err Then
If Err.Number = 35756 Then MsgBox "代理不可用"
MsgBox Err.Number & ":" & Err.Description
End If
End Sub
Inet1.RequestTimeout = 60 '请求超时
Inet1.Proxy = "HTTP=" & "59.74.42.152" & ":" & "8080" '代理
Inet1.OpenURL (" http://www.baidu.com/") '打开的网址
MsgBox Val(Mid(Trim(Inet1.GetHeader), 10, 3))
If Err Then
If Err.Number = 35756 Then MsgBox "代理不可用"
MsgBox Err.Number & ":" & Err.Description
End If
End Sub
2013-12-12
展开全部
On Error Resume Next
Inet1.AccessType = 2
Inet1.RequestTimeout = 60
Inet1.Proxy = "HTTP=" & "59.74.42.152" & ":" & "8080"
Inet1.OpenURL (" http://www.baidu.com/")
MsgBox Val(Mid(Trim(Inet1.GetHeader), 10, 3))
If Err Then
If Err.Number = 35756 Then MsgBox "代理不可用"
MsgBox Err.Number & ":" & Err.Description
End If
End Sub
Inet1.AccessType = 2
Inet1.RequestTimeout = 60
Inet1.Proxy = "HTTP=" & "59.74.42.152" & ":" & "8080"
Inet1.OpenURL (" http://www.baidu.com/")
MsgBox Val(Mid(Trim(Inet1.GetHeader), 10, 3))
If Err Then
If Err.Number = 35756 Then MsgBox "代理不可用"
MsgBox Err.Number & ":" & Err.Description
End If
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询