| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 578 人关注过本帖
标题:求助QQ音乐查询代码给加上分页代码
只看楼主 加入收藏
ningzhonghui
Rank: 2
等 级:论坛游民
帖 子:74
专家分:13
注 册:2010-11-19
结帖率:84.62%
收藏
 问题点数:0 回复次数:0 
求助QQ音乐查询代码给加上分页代码
<%
action = Request.QueryString("action")
qq = Request.Form("qq")
%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>狼性人生QQ空间音乐地址查询</title>
<style>
<!--
body,td { font-family: 宋体; font-size: 12px }
input { height: 20px }

a:link {color: #000080;text-decoration: none }
a:visited {color: #000080;text-decoration: none}
a:hover {color: #000080;text-decoration: underline }
-->
</style>
<script type="text/javascript">
<!--
function go(htmlurl){
var newwin=window.open(htmlurl,"1fzl","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,statusbar=no,top=350,left=200,width=410,height=140");
newwin.focus();
return false;
}
//-->
</script>
</head>

<body topmargin="20" leftmargin="0">

<div align="center">
<table border="1" width="680" cellspacing="0" cellpadding="5" bordercolor="#CCCCCC" bgcolor="#EEEEEE" style="border-collapse: collapse">
<form method="POST" action="?action=yes">
<tr>
<td width="50%">狼性人生QQ空间音乐地址查询系统</td>
<td width="50%">&nbsp;输入QQ号: <input type="text" name="qq" size="20" value="<%=qq%>"> <input type="submit" value="查询"></td>
</tr>
</form>
</table>
<%
if action = "yes" then

if qq="" then
Response.Write "<script>window.alert('QQ号不能为空!');history.back(-1);</script>"
Response.End
end if
%>
<table cellspacing="0" cellpadding="0" height="35">
<tr>
<td align="center">URL中间有 qqmusic. 为QQ官方歌曲,加了验证的,无法使用和试听!</td>
</tr>
</table>
<table border="1" width="680" cellspacing="0" cellpadding="5" bordercolor="#CCCCCC" style="border-collapse: collapse">
<tr align="center" bgcolor="#EEEEEE">
<td width="30">ID</td>
<td>歌曲名</td>
<td>地址</td>
<td width="30">试听</td>
</tr>
<%
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 &"<br>"
Next
Set objRegExp = Nothing
Set Matches = Nothing
End Function

SourceCode = BytesToBstr(Get_Str("http://qzone-music.))

Name = Ahref(SourceCode,"<xsong_name>.+?</xsong_name>")
Name = Replace(Name,"<xsong_name><![CDATA[","")
Name = Replace(Name," ]]></xsong_name>","")

Url = Ahref(SourceCode,"<xsong_url>.+?</xsong_url>")
Url = Replace(Url,"<xsong_url><![CDATA[","")
Url = Replace(Url," ]]></xsong_url>","")

NameID = Split(Name,"<br>")
UrlID = Split(Url,"<br>")

For i=0 To ubound(NameID)-1
%>
<tr>
<td align="center"><%=i%></td>
<td><%=NameID(i)%></td>
<td><a href="<%=UrlID(i)%>" target="_blank"><%=UrlID(i)%></a></td>
<td align="center"><a href="play.asp?url=<%=UrlID(i)%>" onClick="return go(this.href);">试听</a></td>
</tr>
<%
Next
%>
</table>
<%
end if
%>
<table border="0" width="680" cellspacing="0" cellpadding="5">
</div>
</body>
</html>

前些时间学会了数据库读出数据且会简单分页拉!但上面的我就不地运用得上啊,请大侠高手们给分页下吧!
搜索更多相关主题的帖子: javascript function content QQ音乐 style 
2011-05-19 15:20
快速回复:求助QQ音乐查询代码给加上分页代码
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017448 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved