Dim xmlHtppDownPage As XMLHTTP
Public Function DownPage(ByVal strUrl As String) As String
   DownPage = ""
   On Error GoTo error1:
   If xmlHtppDownPage Is Nothing Then
       Set xmlHtppDownPage = New XMLHTTP
   End If
  Â
   xmlHtppDownPage.open "GET", strUrl, False
   xmlHtppDownPage.send
   If xmlHtppDownPage.Status <> 200 Then
       Exit Function
   End If
   DownPage = BytesToBstr(xmlHtppDownPage.responseBody, "GB2312")    Exit Function
error1:
  Â
End Function    Function BytesToBstr(ByVal body As String, ByVal strEncode As String) As String
   BytesToBstr = ""
On Error GoTo error1:
   Dim objstream As ADODB.Stream
   Set objstream = New ADODB.Stream
   objstream.Type = adTypeText
   objstream.Mode = adModeReadWrite
   objstream.open
   objstream.WriteText body
   objstream.Position = 0
   objstream.Type = adTypeText
   objstream.Charset = strEncode     '转æ¢åæ¥é»è®¤çUTF-8ç¼ç 转æ¢æGB2312ç¼ç ï¼å¦åç´æ¥ç¨XMLHTTPç»ä»¶è°ç¨æä¸æå符çç½é¡µå¾å°çå°æ¯ä¹±ç
   BytesToBstr = objstream.ReadText
   objstream.Close
   Set objstream = Nothing
   Exit Function
error1:
  Â
End Function