Function getHTTPPage(url,charcode)
dim objXML
'set objXML=createobject("MSXML2.SERVERXMLHTTP.3.0") '调用XMLHTTP组件,测试空间◈是否支持XMLHTTP
set objXML=createobject("Microsoft.XMLHTTP")
objXML.open "GET",url,false 'false表示以同□□□步的方式丨获取网页□□代码,了解什么□□□是同步?什么是异□□□□步?
objXML.send() '发送
getHTTPPage=bBytesToBstr(objXML.responseBody,charcode)'返回信息,同时用函□□数定义编◈码
set objXML=nothing'关闭
End Function
Function bBytesToBstr(body,charcode)
dim objstream
set objstream = CreateObject("adodb.stream") '//调用adodb.stream组件
objstream.Type = 1
objstream.Mode =3
objstream.Open
objstream.Write body
objstream.Position = 0
objstream.Type = 2
objstream.Charset = charcode '转换原来◇默认的UTF-8编码转换□□□□成GB2312编码,否则直接□□□用XMLHTTP调用有中□□□□文字符的□□□网页得到□□的将是乱□□□码
bBytesToBstr = objstream.ReadText
objstream.Close
set objstream = nothing
end Function
通过使用□□□□这个抓取△函数,谷歌的收□□□录数据、排名数据◉都可以正○常获取了,从而解决□□□□了这个BUG。
BG大游集团站长□□□□工具正在□□□□一步步完□□□善,而且源代□□码全部开□□□□源,只希望保□□□□留版权信□□□□息。