<html> <head> <% Dim objXMLHTTP, xml Set xml = CreateObject("Microsoft.XMLHTTP") xml.Open "GET","http://localhost/website/manageindex.htm", False xml.Send Function bin2str(binstr) Dim varlen,clow,ccc,skipflag '中文字符Skip标志 skipflag=0 ccc = "" If Not IsNull(binstr) Then varlen=LenB(binstr) For i=1 To varlen If skipflag=0 Then clow = MidB(binstr,i,1) '判断是否中文的字符 If AscB(clow) > 127 Then 'AscW会把二进制的中文双字节字符高位和低位反转,所以要先把中文的高低位反转 ccc =ccc & Chr(AscW(MidB(binstr,i+1,1) & clow)) skipflag=1 Else ccc = ccc & Chr(AscB(clow)) End If Else skipflag=0 End If Next End If bin2str = ccc End Function function utf2str(binstr)end function%></head><body> <% response.Write bin2str(xml.responseText) %> </body></html>
<head>
<%
Dim objXMLHTTP, xml
Set xml = CreateObject("Microsoft.XMLHTTP")
xml.Open "GET","http://localhost/website/manageindex.htm", False
xml.Send Function bin2str(binstr)
Dim varlen,clow,ccc,skipflag
'中文字符Skip标志
skipflag=0
ccc = ""
If Not IsNull(binstr) Then
varlen=LenB(binstr)
For i=1 To varlen
If skipflag=0 Then
clow = MidB(binstr,i,1)
'判断是否中文的字符
If AscB(clow) > 127 Then
'AscW会把二进制的中文双字节字符高位和低位反转,所以要先把中文的高低位反转
ccc =ccc & Chr(AscW(MidB(binstr,i+1,1) & clow))
skipflag=1
Else
ccc = ccc & Chr(AscB(clow))
End If
Else
skipflag=0
End If
Next
End If
bin2str = ccc
End Function
function utf2str(binstr)end function%></head><body>
<%
response.Write bin2str(xml.responseText)
%>
</body></html>