%
'##### QQ空间音乐查询程序
'##### 制作:711网络 tc711.com
'##### 可任意更改使用,不过希望能保留版权,或给本站做个链接!
action = Request.QueryString("action")
qq = Request.Form("qq")
if qq="" then
qq=187367103
end if
%>
711网络QQ空间音乐查询
<%
if action = "yes" or action = "" then
if qq="" then
Response.Write ""
Response.End
end if
%>
| URL中间有 qqmusic.qq.com 为QQ官方歌曲,加了验证的,无法使用和试听! |
| ID |
歌曲名 |
地址 |
试听 |
<%
Function Get_Str(GetUrl)
Dim oSend
Set oSend = Server.CreateObject("Micros"&"oft.XM"&"LHTTP")
With oSend
Get_Str = oSend.open ("GET",GetUrl,False)
oSend.send()
Get_Str = oSend.ResponseBody
End With
Set oSend = Nothing
End Function
Function BytesToBstr(body)
Dim objstream
set objstream = Server.CreateObject("ado"&"db.st"&"ream")
objstream.Type = 1
objstream.Mode =3
objstream.Open
objstream.Write body
objstream.Position = 0
objstream.Type = 2
objstream.Charset = "GB2312"
BytesToBstr = objstream.ReadText
objstream.Close
set objstream = nothing
End Function
Function Ahref(strHTML,ZZBDS)
Dim objRegExp, strOutput
Set objRegExp = New Regexp
objRegExp.IgnoreCase = True
objRegExp.Global = True
objRegExp.Pattern = ZZBDS
Set Matchs = objRegExp.Execute(strHTML)
For Each Match in Matchs
Ahref = Ahref & Match.Value &"
"
Next
Set objRegExp = Nothing
Set Matches = Nothing
End Function
SourceCode = BytesToBstr(Get_Str("http://qzone-music.qq.com/fcg-bin/fcgi_agent_zhenghe.fcg?UIN="&qq&"&TYPE=16&PAGE_START=1&PAGE_END=10000&SELECT_FLAG=1"))
Name = Ahref(SourceCode,".+?")
Name = Replace(Name,"","")
Url = Ahref(SourceCode,".+?")
Url = Replace(Url,"","")
NameID = Split(Name,"
")
UrlID = Split(Url,"
")
For i=0 To ubound(NameID)-1
%>
| <%=i%> |
<%=NameID(i)%> |
<%=UrlID(i)%> |
试听 |
<%
Next
%>
<%
end if
%>