⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 music.asp

📁 WAP网上购物系统源程序,,有兴趣的朋友,一起研究一下..交流经眼
💻 ASP
字号:
<!--#include file=INC/skin.asp-->

<%
dim const_txl_HomeUrl,errstr,page
Dim fmp3,frm,fwma,fasf,f,url,oSend,SourceCode
Dim web_start,url_start,url_end,numm,betw,first,tt1,num1,hao1
Dim Turl,Mm1,fexe,frar,fzip,Mm211,Mm21,Mm22,Mm3,TDurl,MusicName
Dim singer,Pbetw,Pfirst,Num,SourceCode1,i
errstr=""
const_txl_HomeUrl=""
Call opendatabase
txl_SiteHead const_txlname&"-音乐搜索"
call online
Call CloseDataBase
%>
<script>
function killErrors()
{
return true
}
window.onerror = killErrors
</script>
<script>
function valid_search2(){
if(  document.searchview.word.value=="")
{window.alert("对不起,关键字不能为空!");
document.searchview.word.focus();
return false;
} ;
}
</script>
</head>
<body>

    <table width="779" border="0" align="center" cellpadding="0" cellspacing="10">
      <tr>
        <td><b>当前位置:<a href="<%=const_homepageurl%>">首页</a> &gt;&gt; <a href="<%=const_txl_HomeUrl&const_txlurl%>"><%=const_txlname%></a> &gt;&gt;互动影音&gt;&gt; </b></td>
        <td align="right"><font color="#FF0000">娱乐导航: </font>
            <%Call shownav()%>
        </td>
      </tr>
</table>
    <table width="772" align="center" cellpadding="0" cellspacing="8">
    <form action="music.asp" method="get"><tr>
      <td width="100%">
        请输入搜索关键字:
          <input class="input" maxLength="150" size="28" name="key" value="<%=Request("Key")%>">&nbsp;
        <input id="fmp3" type="checkbox" value="1" name="fmp3" <%if Request("fmp3")="1" then Response.Write("checked")%>> Mp3
        <input id="frm" type="checkbox" value="1" name="frm" <%if Request("frm")="1" then Response.Write("checked")%>> Rm
        <input id="fwma" type="checkbox" value="1" name="fwma" <%if Request("fwma")="1" then Response.Write("checked")%>> Wma
        <input id="fasf" type="checkbox" value="1" name="fasf" <%if Request("fasf")="1" then Response.Write("checked")%>> Asf&nbsp; <input type="submit" value="音乐搜索">
       </td>   
    </tr></form>  
</table> 
<% 
on error resume next
														
Const adTypeBinary = 1
Const adTypeText = 2
Function Bytes2bStr(vin)
	Dim BytesStream,StringReturn
	Set BytesStream = Server.CreateObject("ADODB.Stream")
	With BytesStream
		.Type = adTypeText
		.Open
		.WriteText vin
		.Position = 0
		.Charset = "GB2312"
		.Position = 2
		StringReturn = .ReadText
		.close
	End With
	Set BytesStream = Nothing
	Bytes2bStr = StringReturn
End Function

if Request("page")="" then
page=1
else
page=Request("page")
end if

if Request("fmp3")="" then fmp3=0 else fmp3=1
if Request("frm")="" then frm=0 else frm=1
if Request("fwma")="" then fwma=0 else fwma=1
if Request("fasf")="" then fasf=0 else fasf=1
F="&fmp3="&fmp3&"&frm="&frm&"&fwma="&fwma&"&fasf="&fasf
Url = "http://search.sogua.com/search/search.asp?key='"&Request("key")&"'&page="&page&F

set oSend=createobject("Microsoft.XMLHTTP")
SourceCode = oSend.open ("GET",url,false) 
oSend.send()
if err.number<>0 then
Response.write err.description
Response.End()
end if  

SourceCode = bytes2BSTR(oSend.responseBody)

web_start=inStr(SourceCode,"共找到")
url_start=inStr(web_start,SourceCode,"<font color=#FF7100>")
url_end=inStr(url_start,SourceCode,"</font></b> <font")
numm=mid(SourceCode,url_start+20,url_end-url_start-20)

betw=instr(SourceCode,"<tr height=16  align=center>")-instr(SourceCode,"<td width="&Chr(34)&"753"&chr(34)&" align="&chr(34)&"center"&chr(34)&" colspan=9 height="&chr(34)&"19"&chr(34)&"") 
first=instr(SourceCode,"<tr height=16  align=center>") 
SourceCode1 = Mid(SourceCode,first,abs(betw))

tt1=split(SourceCode1,"<a href=")

num1=ubound(tt1)
if num1<>0 then
Response.write"<center><table height=28 cellSpacing=0 cellPadding=0 width=772 bgColor=#FFFFFF border=1 bordercolor=#CCCCCC style=""border-collapse:collapse;""><tr><td width=305  class=blu height=25> 歌 曲 名 字 </td><td width=89 class=blu height=25><center>歌 手</td><td width=59  class=blu height=25><center>大 小</td><td width=59  class=blu height=25><center>格 式</td><td width=60  class=blu height=25><center>协 议</td><td width=60  class=blu height=25><center>连 通 率</td><td width=60  class=blu height=25><center>歌 词</td><td width=60  class=blu height=25><center>试 听</td></tr>"
for i =1 to Cint(num1) step 2
hao1=split(tt1(i)," onClick")
Turl=Replace(hao1(0),chr(34),"")
Mm1=split(hao1(1),"target=_blank>")
if fexe=1 or frar=1 or fzip=1 then
Mm211=split(Mm1(1),"</a>")
else
Mm21=split(Mm1(1)," - ")
Mm22=split(Mm21(1),"</a>")
end if
Mm3=split(Mm1(1),"</td>")

Url="http://search.sogua.com/search/"&Turl
TDurl=Replace(Url,"http://search.sogua.com/search/view.asp?","http://search.sogua.com/search/view.asp?action=like_search&")
if fexe=1 or frar=1 or fzip=1 then
MusicName=Replace(Mm211(0),"<","&#8249;")
MusicName=Replace(MusicName,">","&#8250;")
else
singer=Replace(Mm21(0),"<","&#8249;")                
singer=Replace(singer,">","&#8250;")
MusicName=Replace(Mm22(0),"<","&#8249;")
MusicName=Replace(MusicName,">","&#8250;")
end if

Response.Write "<tr><td width=305 bgColor=#ffffff height=25> <a title='"&MusicName&"' style='cursor:hand' onClick="&chr(34)&"javascript:window.open('music_disp.asp?url="&TDurl&"&singer="&singer&"&id="&MusicName&"&size="&mid(Mm3(1),36,15)&"&gs="&mid(Mm3(2),36,15)&"&xy="&mid(Mm3(3),36,15)&"&sd="&mid(Mm3(4),36,4)&"', 'newwindow', 'height=275, width=471, top=120, left=120, toolbar=no, menubar=no, scrollbars=no,resizable=no,location=no, status=no')"&chr(34)&">"&MusicName&"</a></td>"
if singer<>"" then
Response.Write "<td width=89 bgColor=#ffffff align=center height=25><a title='搜索 "&singer&" 的歌曲' style='cursor:hand' href='music.asp?key="&singer&"' target=_blank>"&singer&"</a></td>"
else
Response.Write "<td width=89 bgColor=#ffffff align=center height=25>未知</td>"
end if
Response.Write "<td width=60 bgColor=#ffffff align=center height=25>"&mid(Mm3(1),36,15)&"</td>" &chr(10)
Response.Write "<td width=60 bgColor=#ffffff align=center height=25>"&mid(Mm3(2),36,15)&"</td>" &chr(10)
Response.Write "<td width=60 bgColor=#ffffff align=center height=25>"&mid(Mm3(3),36,15)&"</td>" &chr(10)
Response.Write "<td width=60 bgColor=#ffffff align=center height=25>"&mid(Mm3(4),36,15)&"</td>" &chr(10)
Response.Write("<td width=60 bgColor=#ffffff align=center height=25><a href='http://www.baidu.com/m?tn=baidump3lyric&ct=150994944&rn=10&word="&MusicName&"&lm=-1' target='_blank'><img src=pic/book.gif border=0></a></td>"&chr(10))
Response.Write("<td width=60 bgColor=#ffffff align=center height=25><a title='"&MusicName&"' style='cursor:hand' onClick="&chr(34)&"javascript:window.open('music_disp.asp?url="&TDurl&"&singer="&singer&"&id="&MusicName&"&size="&mid(Mm3(1),36,15)&"&gs="&mid(Mm3(2),36,15)&"&xy="&mid(Mm3(3),36,15)&"&sd="&mid(Mm3(4),36,4)&"', 'newwindow', 'height=275, width=471, top=120, left=120, toolbar=no, menubar=no, scrollbars=no,resizable=no,location=no, status=no')"&chr(34)&"><img src=pic/real.gif border=0></a></td>"&chr(10))
Response.write"</tr>"&chr(10)
next

Response.Write("</Table>")
else
Response.Write("<table align=center width=778  bgcolor=#ffffff border=0 cellspacing=0 cellpadding=0><tr><td>")
Response.Write("<br /><br /><br /><center>")
Response.Write("没有你要找的歌请")
Response.Write("<br /><br /><br /></center>")
Response.write "</td></tr>"
end if
Pbetw=Abs(int(instr(SourceCode,"<td width="&Chr(34)&"753"&Chr(34)&" align="&Chr(34)&"center"&Chr(34)&" colspan=9 height="&Chr(34)&"19"&Chr(34)&"")-instr(SourceCode,"</font><a target=""_blank""")))
Pfirst=instr(SourceCode,"<td width="&Chr(34)&"753"&Chr(34)&" align="&Chr(34)&"center"&Chr(34)&" colspan=9 height="&Chr(34)&"19"&Chr(34)&"") 
Num=Mid(SourceCode,Pfirst,Pbetw)
Response.Write("<br><br>")
Response.Write(Replace(Replace(Num,"'",""),"search.asp","music.asp"))
Response.write "共找到 <font color=red>"&numm&"</font> 个结果&nbsp;&nbsp;最后检测日期:"&(Date()-1)&""
Response.write ""
web_end
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -