XMLHTTP grabs data when garbled

xiaoxiao2021-03-06  93

9cbs Original post: http://community.9cbs.net/expert/topic/3316/3316086.xml? Temp = .2790033

Internal code problem. Use this code, I have changed very thin. 'Use XMLHTTTP to capture the address and send content processing Function GetBody (URL) DIM Objxml on Error Resume Next Set Objxml = CreateObject ("Microsoft.xmlhttp" WITH OBJXML .Open "Get", URL, FALSE, "", "" "" "" "" GetBody, "GB2312") set objxml = nothing endbody = 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-122369.html

New Post(0)