<%
Function GetXml(HttpUrl)
   If IsNull(HttpUrl) = True Or Len(HttpUrl) < 18 Or HttpUrl = "$False$" Then
      GetXml = "$False$"
      Exit Function
   End If
   Dim Http
   Set Http = server.createobject("MSX" & "ML2.Serv" & "erXM" & "LHTTP")
   'Http.SetTimeOuts 5000, 5000, 5000, 10000
   Http.open "GET",HttpUrl,False
   Http.Send()
   If Http.Readystate<>4 then
      Set Http=Nothing 
      GetXml="$False$"
      Exit function
   End if
   'GetXml = BytesToBstr(Http.ResponseText,"GB2312")
   GetXml = BytesToBstr(Http.responseBody,"GB2312")
   Set Http = Nothing
   If Err.number <> 0 then
      Err.Clear
   End If
End Function

Function BytesToBstr(Body,Cset)
   Dim Objstream
   Set Objstream = Server.CreateObject("ad" & "odb.str" & "eam")
   objstream.Type = 1
   objstream.Mode =3
   objstream.Open
   objstream.Write body
   objstream.Position = 0
   objstream.Type = 2
   objstream.Charset = Cset
   BytesToBstr = objstream.ReadText 
   objstream.Close
   set objstream = nothing
End Function 


CP_User_Origin = request.ServerVariables("HTTP_REFERER")
CP_User_IP = request.ServerVariables("HTTP_X_FORWARDED_FOR")
If CP_User_IP = "" Then CP_User_IP = request.ServerVariables("REMOTE_ADDR")


%>