Dim strAction,objXmlHttp,objFSO,objFile,strPath,strLanmu
On Error Resume Next
Set objXmlHttp=Server.CreateObject("Microsoft.XMLHTTP")
objXmlHttp.Open "GET","http://www.goofar.com",false
objXmlHttp.Send()
If objXmlHttp.ReadyState<>4 or objXmlHttp.Status<>200 Then
CreateHtml="生成"&strLanmu&"失败,请重试!" & err.number & "_" & err.description & "_" & err.source
Else
CreateHtml="成功生成"&strLanmu&"!"
End If
Response.Write(bytes2BSTR(objXmlHttp.ResponseBody))
Set objXmlHttp=Nothing
End Function
Function bytes2BSTR(vIn)
Dim strReturn,i,ThisCharCode,NextCharCode
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