asp读取.Jsp类型的文件接口返回值
代码
<%
''''''以下以解决responseBody后乱码的问题'''''''
Function bytes2BSTR(vIn)
strReturn = ""
For i = 1 To LenB(vIn)
ThisCharCode = AscB(MidB(vIn,i,1))
If ThisCharCode < &H80 Then
strReturn = strReturn & Chr(ThisCharCode)
Else
NextCharCode = AscB(MidB(vIn,i+1,1))
strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode))
i = i + 1
End If
Next
bytes2BSTR = strReturn
End Function
strUrl = "http://61.129.52.134/bms/web/account-filled.jsp?money=100&accountid=824913935993&devicename=500001"
dim objXmlHttp
set objXmlHttp = Server.CreateObject("Microsoft.XMLHTTP")
objXmlHttp.open "GET",strUrl,false
objXmlHttp.send()
Dim binFileData
binFileData = bytes2BSTR(objXmlHttp.responseBody)'解决乱码
Response.Write(binFileData)
%>