XMLHTTP grabs data when garbled

xiaoxiao2021-03-06  72

'Use XMLHTTP to capture the address and transfer content processing Function getBody (URL) ?? Dim objxml ??????? on error resume next ??????? set objxml = creteObject ("Microsoft.xmlhttp") ?? ????? with objxml ??????? .open "get", url, false, "" "" "??????? GetBody = .RESPONSEBODY? ?????? End with ??????? getBody = bytestobstr (getBody, "GB2312") ??????? set objxml = nothing end function 'Using AdoDb.Stream to process binary data 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 = Nothingend FUNCTION

转载请注明原文地址:https://www.9cbs.com/read-120244.html

New Post(0)