http://www.google.com/search?q=%E4%B8%AD%E5%9B%BD&btnG=Google%E6%90%9C%E7%B4%A2&hl=zh-CN&ie=UTF-8&oe=UTF-8
这个地址用浏览器看正常
用inet1.OpenURL(http://www.google.com/search?q=%E4%B8%AD%E5%9B%BD&btnG=Google%E6%90%9C%E7%B4%A2&hl=zh-CN&ie=UTF-8&oe=UTF-8) 返回的是一个403 Forbidden 页面
为什么,应该怎么弄,有解决办法吗???
这个地址用浏览器看正常
用inet1.OpenURL(http://www.google.com/search?q=%E4%B8%AD%E5%9B%BD&btnG=Google%E6%90%9C%E7%B4%A2&hl=zh-CN&ie=UTF-8&oe=UTF-8) 返回的是一个403 Forbidden 页面
为什么,应该怎么弄,有解决办法吗???
解决方案 »
- 有什么办法让WebBrowser占用的资源更少
- 各位大侠请帮小弟作道面试题,先谢了!
- 在VB6中利用ADO查询得到的记录集如何保存为新的数据库或表。请看代码(已正确运行)
- 【问】如何点击其它“按钮”时让ComboBox选定高亮文本焦点不变?
- 求Basic书籍
- 报错!run-time error '-2147189571(80047cbd)'未启用创建功能。马上给分
- 为什么总是出错“3265”?在线等待,急。。。。。。。。
- SunnyCai(飞鸟),文档已收到,请进来拿分.
- trim的问题
- 有关文件操作的问题,求救!
- 怎么能够遍沥一个picbox里的控件?是否用Container?
- xyhv (乌龙茶) : 问一下,你是怎么解决ActiveReport 2.0 在2000上纸张设置的,急用!谢谢!
用一个隐藏的Webbrowser控件试试呀,不知道你具体要得到什么值?
为什么google不允许这样的访问,它是怎么处理的,还有什么办法吗
Option ExplicitPrivate Sub cmdExit_Click()
If MsgBox("Are you sure?", vbYesNo, "Exiting the application") = vbYes Then
Unload Me
End If
End SubPrivate Sub cmdGo_Click()
Dim objLink As HTMLLinkElement
Dim objMSHTML As New MSHTML.HTMLDocument
Dim objDocument As MSHTML.HTMLDocument
lblStatus.Caption = "Gettting document via HTTP"
' This function is only available with Internet Explorer 5
Set objDocument = objMSHTML.createDocumentFromUrl(txtURL.Text, vbNullString)
lblStatus.Caption = "Getting and parsing HTML document"
' Tricky, to make the function wait for the document to complete, usually
' the transfer is asynchronus. Note that this string might be different if
' you have another language than english for Internet Explorer on the
' machine where the code is executed.
While objDocument.readyState <> "complete"
DoEvents
Wend
lblStatus.Caption = "Document completed"
' Copying the source to the text box
txtSource.Text = objDocument.documentElement.outerHTML
DoEvents
' Copying the title of the page to the label
lblTitle.Caption = "Title : " & objDocument.Title
DoEvents
lblStatus.Caption = "Extracting links"
' Processing the link collection of the HTMLDocument object
For Each objLink In objDocument.links
lstLinks.AddItem objLink
lblStatus.Caption = "Extracted " & objLink
DoEvents
Next
lblStatus.Caption = "Done"
Beep
End Sub