csdn原帖:
http://community.csdn.net/expert/topic/3316/3316086.xml?temp=.2790033
内码问题.用这段代码的吧,我已经改得很精简了.
'使用xmlhttp抓取地址并进次内容处理
function getbody(url)
dim objxml
on error resume next
set objxml = createobject("microsoft.xmlhttp")
with objxml
.open "get", url, false, "", ""
.send
getbody = .responsebody
end with
getbody=bytestobstr(getbody,"gb2312")
set objxml = nothing
end function
'使用adodb.stream处理二进制数据
function bytestobstr(strbody,codebase)
dim objstream
set objstream = server.createobject("adodb.stream")
objstream.type = 1
objstream.mode =3
objstream.open
objstream.write strbody
objstream.position = 0
objstream.type = 2
objstream.charset = codebase
bytestobstr = objstream.readtext
objstream.close
set objstream = nothing
end function