MusicGet 类
2024-05-04 11:02:28
供稿:网友
复制代码 代码如下:
<%
Response.Expires = 0
Response.expiresabsolute = Now() - 1
Response.addHeader "pragma", "no-cache"
Response.addHeader "cache-control", "private"
Response.CacheControl = "no-cache"
Response.Buffer = True
Response.Clear
Server.ScriptTimeOut=999999999
'***************************************************************
'* 定义 MusicGet 类
'***************************************************************
Class GetHttp
Private OXML,FSO,ADOS
Private Sub Class_Initialize
Set OXML = server.CreateObject("Microsoft.XMLHTTP")
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
Set ADOS = Server.CreateObject("ADODB.Stream")
End Sub
Private Sub Class_Terminate
Set OXML = Nothing
Set FSO = Nothing
Set ADOS = Nothing
End Sub
Public Property Get Version
Version="动感采集系统v3.0"
End Property
'*****************************************************************
' function(私有)
' 作用 :利用流进行中文编码
' 参数 :vIn(要进行编码的字符患)
'*****************************************************************
Private Function BytesToBstr(body)
Dim Bdat
Bdat=Body
ADOS.Type = 1
ADOS.Mode =3
ADOS.Open
ADOS.Write Bdat
ADOS.Position = 0
ADOS.Type = 2
ADOS.Charset = "GB2312"
BytesToBstr = ADOS.ReadText