手机
当前位置:查字典教程网 >编程开发 >ASP教程 >asp实现的7xi音乐网的采集源代码
asp实现的7xi音乐网的采集源代码
摘要:共5个文件:2个是配置文件:配置文件:cfg.txt'---保存检测ID信息的,第一次采集时设为1,从小到大检测cfg.asp'---ASP...

共5个文件:

2个是配置文件:

配置文件:

cfg.txt'---保存检测ID信息的,第一次采集时设为1,从小到大检测

cfg.asp'---ASP的配置信息,内容如下:

复制代码 代码如下:

<%

'''

'''╔=======================================╗

'''┆┆

'''┆@系统:7xi音乐采集系统Version2.0┆

'''┆@模块:配置文件┆

'''┆@创建:2006/07/24┆

'''┆@作者:D.S.Fang┆

'''┆@联系:fangds@gmail.comQQ-3700909┆

'''┆@版权:源码公开,无任何版权问题,您可以┆

'''┆放心使用!!!尊重作者劳动成果,请┆

'''┆保留此信息!┆

'''┆┆

'''╚=======================================╝

'''

'

dimpicc_FolderPath,mp3_FolderPath

dimv_7xijs_url,v_7xipicc_url,v_7xiplay_url,v_7xialbum_url,v_7ximp3_url,cfg_name,cfg_line

dimhttpobj,str,str0,str1,str2,str3,str4,str5,str6,str7,str8,str9

dimis_getrm

'---音乐文件是否保存到本地,true-保存;false-不保存

is_getrm=false

'---保存路径

picc_FolderPath="H:mp3dataimages"

mp3_FolderPath="H:mp3datarm"

'---7xi相关页面

v_7xijs_url="http://7xi.net/player/Js.js"

v_7xipicc_url="http://ww.7xi.net/picc/"

v_7xiplay_url="http://7xi.net/playsong/"

v_7xialbum_url="http://ww.7xi.net/Vo2/"

v_7ximp3_url=""'---实时读取

'---检测ID

cfg_name="cfg.txt"

cfg_line=1

'---读取播放js文件,获得rm文件路径

sethttpobj=server.createobject("paopao.http")

str=httpobj.get(v_7xijs_url)

str0=split(str,"theurl2="&chr(34))

str1=split(str0(1),chr(34))

v_7ximp3_url=str1(0)

sethttpobj=nothing

str=""

'---数据库连接

setConn=Server.CreateObject("ADODB.Connection")

Conn.Open"driver={SQLserver};server=localhost;uid=mp3;pwd=mp3;database=mp3db"

'---拼SQL语句execute时需要过滤一下

FunctionIndbStr(str)

ifisNull(str)orstr=""then

IndbStr=str

else

IndbStr=replace(replace(trim(str),"'","''"),"%","")

endif

EndFunction

'---关闭数据库连接

FunctionCloseConn()

conn.close

setconn=nothing

EndFunction

'---取得远程文件并保存到本地

FunctionGetRemoteFiles(RemotePath,LocalPath,FileName)

DimstrBody

DimFilePath

OnErrorResumeNext

'---取得流

strBody=GetBody(RemotePath)

'---取得保存的文件名

ifRight(LocalPath,1)<>""thenLocalPath=LocalPath&""

ifnotCheckDir(bkfolder)thenMakeNewsDirbkfolder

FilePath=LocalPath&GetFileName(RemotePath,FileName)

'---保存文件

ifSaveToFile(strBody,FilePath)=trueanderr.Number=0then

GetRemoteFiles=true

else

GetRemoteFiles=false

endif

EndFunction

'---远程获取内容

FunctionGetBody(url)

DimRetrieval

'---建立XMLHTTP对象

SetRetrieval=CreateObject("Microsoft.XMLHTTP")

WithRetrieval

.Open"Get",url,False,"",""

.Send

GetBody=.ResponseBody

EndWith

SetRetrieval=Nothing

EndFunction

'---重组文件名

FunctionGetFileName(RemotePath,FileName)

DimarrTmp

DimstrFileExt

arrTmp=Split(RemotePath,".")

strFileExt=arrTmp(UBound(arrTmp))

GetFileName=FileName&"."&strFileExt

EndFunction

'---将流内容保存为文件

FunctionSaveToFile(Stream,FilePath)

DimobjStream

OnErrorResumeNext

'---建立ADODB.Stream对象,必须要ADO2.5以上版本

SetobjStream=Server.CreateObject("ADODB.Stream")

objStream.Type=1'以二进制模式打开

objStream.Open

objstream.writeStream

objstream.SaveToFileFilePath,2

objstream.Close()

'---关闭对象,释放资源

Setobjstream=Nothing

iferr.Number<>0then

SaveToFile=false

else

SaveToFile=true

endif

EndFunction

'---读取文本文件

FunctionFSOlinedit(filename,lineNum)

iflinenum<1thenexitfunction

dimfso,f,temparray,tempcnt

setfso=server.CreateObject("scripting.filesystemobject")

ifnotfso.fileExists(server.mappath(filename))thenexitfunction

setf=fso.opentextfile(server.mappath(filename),1)

ifnotf.AtEndofStreamthen

tempcnt=f.readall

f.close

setf=nothing

temparray=split(tempcnt,chr(13)&chr(10))

iflineNum>ubound(temparray)+1then

exitfunction

else

FSOlinedit=temparray(lineNum-1)

endif

endif

Endfunction

'---检查绝对路径是否存在

FunctionCheckFolder(FolderPath)

dimfso1

Setfso1=CreateObject("Scripting.FileSystemObject")

Iffso1.FolderExists(FolderPath)then

'存在

CheckFolder=True

Else

'不存在

CheckFolder=False

Endif

Setfso1=nothing

EndFunction

'---根据指定名称生成目录

FunctionMakeNewsDir(foldername)

dimfso1,f

Setfso1=CreateObject("Scripting.FileSystemObject")

Setf=fso1.CreateFolder(foldername)

MakeNewsDir=True

Setfso1=nothing

EndFunction

''''''''编码(日文字符)''''''''

FunctionJencode(byValiStr)

ifisnull(iStr)orisEmpty(iStr)then

Jencode=""

Exitfunction

endif

dimF,i,E

E=array("Jn0;","Jn1;","Jn2;","Jn3;","Jn4;","Jn5;","Jn6;","Jn7;","Jn8;","Jn9;","Jn10;","Jn11;","Jn12;","Jn13;","Jn14;","Jn15;","Jn16;","Jn17;","Jn18;","Jn19;","Jn20;","Jn21;","Jn22;","Jn23;","Jn24;","Jn25;")

F=array(chr(-23116),chr(-23124),chr(-23122),chr(-23120),_

chr(-23118),chr(-23114),chr(-23112),chr(-23110),_

chr(-23099),chr(-23097),chr(-23095),chr(-23075),_

chr(-23079),chr(-23081),chr(-23085),chr(-23087),_

chr(-23052),chr(-23076),chr(-23078),chr(-23082),_

chr(-23084),chr(-23088),chr(-23102),chr(-23104),_

chr(-23106),chr(-23108))

Jencode=iStr

fori=0to25

Jencode=replace(Jencode,F(i),E(i))

next

EndFunction

''''''''解码(日文字符)''''''''

FunctionJuncode(byValiStr)

ifisnull(iStr)orisEmpty(iStr)then

Juncode=""

Exitfunction

endif

dimF,i,E

E=array("Jn0;","Jn1;","Jn2;","Jn3;","Jn4;","Jn5;","Jn6;","Jn7;","Jn8;","Jn9;","Jn10;","Jn11;","Jn12;","Jn13;","Jn14;","Jn15;","Jn16;","Jn17;","Jn18;","Jn19;","Jn20;","Jn21;","Jn22;","Jn23;","Jn24;","Jn25;")

F=array(chr(-23116),chr(-23124),chr(-23122),chr(-23120),_

chr(-23118),chr(-23114),chr(-23112),chr(-23110),_

chr(-23099),chr(-23097),chr(-23095),chr(-23075),_

chr(-23079),chr(-23081),chr(-23085),chr(-23087),_

chr(-23052),chr(-23076),chr(-23078),chr(-23082),_

chr(-23084),chr(-23088),chr(-23102),chr(-23104),_

chr(-23106),chr(-23108))

Juncode=iStr

fori=0to25

Juncode=replace(Juncode,E(i),F(i))'□

next

EndFunction

%>

1个是手动添加歌手:

addsinger.asp'---手动添加歌手,内容如下:

程序代码

<%

'''

'''╔=======================================╗

'''┆┆

'''┆@系统:7xi音乐采集系统Version2.0┆

'''┆@模块:手动添加歌手┆

'''┆@创建:2006/07/24┆

'''┆@作者:D.S.Fang┆

'''┆@联系:fangds@gmail.comQQ-3700909┆

'''┆@版权:源码公开,无任何版权问题,您可以┆

'''┆放心使用!!!尊重作者劳动成果,请┆

'''┆保留此信息!┆

'''┆┆

'''╚=======================================╝

'''

'%>

<>

<html>

<head>

<metahttp-equiv="Content-Type"content="text/html;charset=gb2312"/>

<metahttp-equiv="Content-Language"content="gb2312"/>

<title>添加歌手分类_7xi音乐采集更新系统</title>

</head>

<body>

<br>7xi音乐采集更新系统<br><br>

<%

dimsql

dimsinger_name,singer_first_name,singer_sort

singer_name=IndbStr(request("singer_name"))

singer_first_name=Ucase(IndbStr(request("singer_first_name")))

singer_sort=request("singer_sort")

response.write"<br>歌手信息<br><br>姓名:"&singer_name&"<br>字母:"&singer_first_name&"<br>性质:"&singer_sort

sql="insertintod_singer(singer_name,singer_first_name,singer_sort,is_down)values('"&singer_name&"','"&singer_first_name&"','"&singer_sort&"',0)"

response.write"<br><br>"&sql

conn.execute(sql)

CloseConn()

'---歌手添加完成后转入信息采集重新检测

response.write"<br><br>歌手信息检查添加完成,正在准备检查获取更新...<br>"

response.write"<metahttp-equiv=refreshcontent=""1;url=get.asp"">"

%>

</body>

</html>

2个是采集程序:

get.asp'---采集歌手专辑歌曲信息,内容如下

程序代码

<%

'''

'''╔=======================================╗

'''┆┆

'''┆@系统:7xi音乐采集系统Version2.0┆

'''┆@模块:歌手、专辑、歌曲信息采集┆

'''┆@创建:2006/07/24┆

'''┆@作者:D.S.Fang┆

'''┆@联系:fangds@gmail.comQQ-3700909┆

'''┆@版权:源码公开,无任何版权问题,您可以┆

'''┆放心使用!!!尊重作者劳动成果,请┆

'''┆保留此信息!┆

'''┆┆

'''╚=======================================╝

'''

'%>

<>

<html>

<head>

<metahttp-equiv="Content-Type"content="text/html;charset=gb2312"/>

<metahttp-equiv="Content-Language"content="gb2312"/>

<title>歌手专辑歌曲信息采集_7xi音乐采集更新系统</title>

</head>

<body>

<br>7xi音乐采集更新系统<br><br>

<%

dimt7xiid,url,FolderPath,fso,fout

dimsongid(100),songname(100)

dimstrsinger,strlang,stralbum,strtime,strcorp,strcontent,strpicc,singerid,albumid

dimrssort,rssinger,rsalbum,rssong,i,m,sql,okimg

t7xiid=FSOlinedit(cfg_name,cfg_line)

url=v_7xialbum_url&"v_"&t7xiid&".htm"

sethttpobj=server.createobject("paopao.http")

Err.Clear

'onerrorresumenext

str=""

str=httpobj.get(url)

ifstr=""then

CloseConn()

ift7xiid<3198then'---没有检测到时是否递增ID,继续检测

str=t7xiid+1

FolderPath=Server.MapPath(".")

Setfso=Server.CreateObject("Scripting.FileSystemObject")

Setfout=fso.CreateTextFile(FolderPath&"cfg.txt")

fout.WriteLinestr

fout.close

response.write"<br>当前ID号不存在,正在检查下一ID号...<br>"

response.write"<metahttp-equiv=refreshcontent=""0;url=get.asp"">"

else'---不需要递增ID检测时,转到歌曲信息采集

response.write"<br>歌手专辑信息检查完毕,正在准备检查获取歌曲信息...<br>"

response.write"<metahttp-equiv=refreshcontent=""0;url=getrm.asp"">"

response.end

endif

else

str0=split(str,"歌手:")

str1=split(str0(1),"</td>")

strsinger=IndbStr(str1(0))

response.write"<br>歌手:"&strsinger

str0=split(str,"语种:")

str1=split(str0(1),"</td>")

strlang=str1(0)

response.write"<br>语种:"&strlang

str0=split(str,"专辑:")

str1=split(str0(1),"</a>")

str2=split(str1(0),""">")

stralbum=IndbStr(str2(1))

response.write"<br>专辑:"&stralbum

str0=split(str,"时间:")

str1=split(str0(1),"</td>")

strtime=str1(0)

response.write"<br>时间:"&strtime

str0=split(str,"公司:")

str1=split(str0(1),"</td>")

strcorp=str1(0)

response.write"<br>公司:"&strcorp

str0=split(str,"<trvalign=""top""><tdcolspan=""2"">")

str1=split(str0(1),"</td>")

strcontent=replace(replace(IndbStr(str1(0)),"<br>",chr(13)),"","")

response.write"<br>简介:"&strcontent

str0=split(str,"<imgsrc=""../picc/")

str1=split(str0(1),"""")

strpicc=str1(0)

response.write"<br>图片:"&strpicc

response.write"<br><imgsrc="&v_7xipicc_url&strpicc&"border=0>"

setrssinger=conn.execute("select*fromd_singerwheresinger_name='"&strsinger&"'")

'---歌手信息不存在时需要手动添加歌手

ifrssinger.eofthen

response.write"<br>select*fromd_singerwheresinger_name='"&strsinger&"'"

response.write"<br><br>歌手不存在,需要手动操作添加。<br><br>请按以下要求添加歌手:<br><br>"

%>

<formaction="addsinger.asp">

<inputtype="text"size="20"name="singer_name"value="<%=strsinger%>">

<inputtype="text"size="6"name="singer_first_name"value="姓"maxlength="3">

<selectname="singer_sort"size="1"><%'%>

<%

setrssort=conn.execute("select*froms_sort")

dowhilenotrssort.eofandi<10

%>

<optionvalue="<%=rssort("id")%>"><%=rssort("sort_name")%></option><%'%>

<%

rssort.movenext

loop

rssort.close

setrssort=nothing

%></select>

<inputtype="submit"value="添加">

</form>

<%

CloseConn()

response.end

else'---歌手信息已存在,检查专辑信息是否需要入库

singerid=rssinger("id")

conn.execute("updated_singersetis_down=0whereid="&singerid)

response.write"<br><br>歌手信息正确,正在检查获取专辑信息...<br>"

setrsalbum=conn.execute("select*fromd_albumwherealbum_singer="&singerid&"andalbum_name='"&stralbum&"'")

ifrsalbum.eofthen

str1=split(strpicc,".")

str2=str1(0)

sql="insertintod_album(album_singer,file_img,album_name,album_lang,album_corp,album_time,album_intro,add_time,is_down,album_7xi)values('"&singerid&"','"&strpicc&"','"&stralbum&"','"&strlang&"','"&strcorp&"','"&strtime&"','"&strcontent&"','"&now&"',0,"&t7xiid&")"

conn.execute(sql)

'---采集保存专辑缩略图

okimg=GetRemoteFiles(v_7xipicc_url&strpicc,picc_FolderPath,str2)

response.write"<br>专辑信息检查添加完成,正在检查获取歌曲信息..."&"<br>SQL语句:"&sql

else

response.write"<br><br>专辑信息正确,正在准备检查获取歌曲信息..."

endif

rsalbum.close

setrsalbum=nothing

endif

rssinger.close

setrssinger=nothing

setrsalbum=conn.execute("select*fromd_albumwherealbum_singer="&singerid&"andalbum_name='"&stralbum&"'")

albumid=rsalbum("id")

rsalbum.close

setrsalbum=nothing

response.write"<br><br>专辑歌曲信息<br>"

'----歌曲ID

i=1

str0=split(str,"<inputtype="&chr(34)&"checkbox"&chr(34)&"name="&chr(34)&"checked"&chr(34)&"value="&chr(34))

response.write"<br>歌曲ID:"

dowhilei<=Ubound(str0)

str1=split(str0(i),chr(34))

songid(i-1)=str1(0)

response.writesongid(i-1)&"-"

i=i+1

loop

response.write"共"&i&"首。"

'---歌曲名称

m=1

str0=split(str,"<ahref=""../IVR.asp?id=")

response.write"<br><br>歌曲:"

dowhilem<=Ubound(str0)

str1=split(str0(m),"""target=""_blank""><imgsrc=""../images/mmsring1.gif""alt=""免费点歌")

songname(m-1)=Jencode(replace(str1(0),"'","''"))

response.writeJuncode(songname(m-1))&"-"

m=m+1

loop

response.write"共"&i&"首。"

'---歌曲ID数目和歌曲名数目不一致时需要检查是否有误

ifi<>mthen

response.write"<br><br><fontcolor=red><b>错误:</b>歌曲ID数目与歌曲名数目不一致,请检查目标页面:"&url&"</font>"

response.end

endif

'---检查歌曲是否需要入库

dowhilei>1

setrssong=conn.execute("select*fromd_mp3wheremp3_album="&albumid&"andmp3_singer="&singerid&"andmp3_name='"&songname(i-2)&"'")

ifrssong.eofthen

sql="insertintod_mp3(mp3_7xi,mp3_singer,mp3_album,mp3_name)values('"&songid(i-2)&"','"&singerid&"','"&albumid&"','"&songname(i-2)&"')"

conn.execute(sql)

response.write"<br><fontcolor=red>添加:"&songname(i-2)&"</font>"

response.writesql

else

response.write"<br>跳过:"&songname(i-2)

endif

rssong.close

setrssong=nothing

i=i-1

loop

CloseConn()

'---记录下一检测ID号

str=t7xiid+1

FolderPath=Server.MapPath(".")

Setfso=Server.CreateObject("Scripting.FileSystemObject")

Setfout=fso.CreateTextFile(FolderPath&"cfg.txt")

fout.WriteLinestr

fout.close

'---继续检测下一ID

response.write"<br>正在检测下一ID信息..."

response.write"<metahttp-equiv=refreshcontent=""0;url=get.asp"">"

endif

%>

</body>

</html>

getrm.asp'---采集RM文件更新歌曲信息,内容如下:

程序代码

<%

'''

'''╔=======================================╗

'''┆┆

'''┆@系统:7xi音乐采集系统Version2.0┆

'''┆@模块:歌曲文件、歌词等信息采集┆

'''┆@创建:2006/07/24┆

'''┆@作者:D.S.Fang┆

'''┆@联系:fangds@gmail.comQQ-3700909┆

'''┆@版权:源码公开,无任何版权问题,您可以┆

'''┆放心使用!!!尊重作者劳动成果,请┆

'''┆保留此信息!┆

'''┆┆

'''╚=======================================╝

'''

'%>

<>

<html>

<head>

<metahttp-equiv="Content-Type"content="text/html;charset=gb2312"/>

<metahttp-equiv="Content-Language"content="gb2312"/>

<title>歌曲文件歌词等信息采集_7xi音乐采集更新系统</title>

</head>

<body>

<br>7xi音乐采集更新系统<br><br>

<%

dimgetcount,rssong,id,t7xiid,url,filerm,tmpurl,i,tmpfolder,okrm,singer,song,tmp_url,lyric,rs

'---每次处理歌曲数量

getcount=5

setrssong=conn.execute("selecttop"&getcount&"a.*,b.singer_namefromd_mp3a,d_singerbwherea.mp3_singer=b.idanda.file_rmisnullorderbya.iddesc")

ifrssong.eofthen'---歌曲信息处理完成

rssong.close

setrssong=nothing

CloseConn()

response.write"<br>歌曲文件信息检查采集完成!"

response.write"<br><br>采集完了,可以做垃圾站了!"

response.end

else

dowhilenotrssong.eof

id=rssong("id")

t7xiid=rssong("mp3_7xi")

singer=replace(rssong("singer_name"),"","%20")

song=replace(rssong("mp3_name"),"","%20")

response.write"<br><br>歌曲名-"&singer&"-"&song

'---目标页面

url=v_7xiplay_url&t7xiid&".htm"

sethttpobj=server.createobject("paopao.http")

Err.Clear

onerrorresumenext

response.write"<br>"&url

str=httpobj.get(url)

ifErr=0then'---读取目标页面正常时的处理

'----歌曲文件名及文件夹

str0=split(str,"<paramname='src'value='"&chr(34)&"+s_list+"&chr(34))

str1=split(str0(1),"'>")

filerm=str1(0)

response.write"<br>文件名-"&filerm

tmpurl=v_7ximp3_url&filerm

response.write"<br>目标源-"&tmpurl

'---需要保存音乐文件到本地时,采集保存音乐文件

ifis_getrmthen

str0=split(filerm,"/")

i=0

dowhilei<Ubound(str0)

tmpfolder=mp3_FolderPath&str0(i)

ifnotCheckFolder(tmpfolder)thenMakeNewsDirtmpfolder

i=i+1

loop

response.write"<br>保存为-"&tmpfolder&""&str0(Ubound(str0))

okrm=GetRemoteFiles(tmpurl,tmpfolder,replace(str0(Ubound(str0)),".rm",""))

else

response.write"<br><fontcolor=red>请注意-</font>RM文件配置为不保存!!!!!!!!!!"

endif

'---歌词采集

tmp_url="http://www.7xi.net/showword.asp?id="&t7xiid

response.write"<br>"&tmp_url

sethttpobj=server.createobject("paopao.http")

str0=httpobj.get(tmp_url)

Err.Clear

onerrorresumenext

str1=split(str0,"<tdwidth=""92%"">"&chr(13))

str2=split(str1(1),"</td>")

lyric=str2(0)

lyric=replace(lyric,"<br>",chr(13))

lyric=replace(lyric,"","")

lyric=replace(replace(lyric,"<p>",""),"</p>","")

lyric=IndbStr(trim(lyric))

ifInstr(lyric,"mp3.baidu.com")thenlyric="暂时还没歌词"

iflen(lyric)<20orErr<>0then

lyric="暂时还没歌词"

response.write"<br>7xi自带歌词不完整,将采集baidu歌词"

endif

iflyric="暂时还没歌词"then

Err.Clear

tmp_url="http://mp3.baidu.com/m?f=ms&rn=10&tn=baidump3lyric&ct=150994944&word="&singer&"+"&song

response.write"<br>"&tmp_url

str0=httpobj.get(tmp_url)

str1=split(str0,"<B><fontstyle=color:#e10900>"&song&"</font></B>")

ifUbound(str1)>=1then

str2=split(str0,"<divstyle=""padding-left:10px;line-height:20px;padding-top:1px"">")

str3=split(str2(1),"</div>")

lyric=str3(0)

lyric=replace(lyric,"<br>",chr(13))

lyric=replace(lyric,"","")

lyric=replace(lyric,"<fontstyle=color:#e10900>","")

lyric=replace(lyric,"</font>","")

else

lyric="暂时还没歌词"

endif

endif

response.write"<br>歌词-"&lyric

'---将采集到的信息更新到数据库

ifis_getrmthen

conn.execute("updated_mp3setfile_rm='"&filerm&"',mp3_lyric='"&lyric&"',is_down='1'whereid="&id)

else

conn.execute("updated_mp3setfile_rm='"&filerm&"',mp3_lyric='"&lyric&"',is_down='0'whereid="&id)

endif

else'---读取目标页面出错时的处理

conn.execute("updated_mp3_tsetfile_rm='nourl',is_down='1'whereid="&id)

response.write"<br><br><fontcolor=red><b>错误:</b>获取目标页面错误,请检查:"&url&"</font>"

response.end

endif

rssong.movenext

loop

rssong.close

setrssong=nothing

CloseConn()

'---继续检测采集下一批歌曲信息

response.write"<br>正在检测下一批歌曲信息...<br><br>"

response.write"<metahttp-equiv=refreshcontent=""0;url=getrm.asp"">"

endif

%>

</body>

</html>

数据库表的SQL脚本:

数据库表

程序代码

s_sort----歌手分类表

ifexists(select*fromdbo.sysobjectswhereid=object_id(N'[dbo].[s_sort]')andOBJECTPROPERTY(id,N'IsUserTable')=1)

droptable[dbo].[s_sort]

GO

CreateTABLE[dbo].[s_sort](

[ID][int]IDENTITY(1,1)NOTNULL,

[sort_name][nvarchar](20)COLLATEChinese_PRC_CI_ASNOTNULL

)ON[PRIMARY]

GO

AlterTABLE[dbo].[s_sort]WITHNOCHECKADD

CONSTRAINT[PK_s_sort]PRIMARYKEYCLUSTERED

(

[ID]

)ON[PRIMARY]

GO

d_singer----歌手信息表

ifexists(select*fromdbo.sysobjectswhereid=object_id(N'[dbo].[d_singer]')andOBJECTPROPERTY(id,N'IsUserTable')=1)

droptable[dbo].[d_singer]

GO

CreateTABLE[dbo].[d_singer](

[ID][int]IDENTITY(1,1)NOTNULL,

[singer_name][nvarchar](255)COLLATEChinese_PRC_CI_ASNULL,

[singer_first_name][nvarchar](50)COLLATEChinese_PRC_CI_ASNULL,

[singer_sort][int]NULL,

[mp3_num][int]NULL,

[is_putup][bit]NULL,

[view_count][int]NULL,

[is_down][bit]NULL

)ON[PRIMARY]

GO

AlterTABLE[dbo].[d_singer]WITHNOCHECKADD

CONSTRAINT[PK_d_singer]PRIMARYKEYCLUSTERED

(

[ID]

)ON[PRIMARY]

GO

d_album----专辑信息表

ifexists(select*fromdbo.sysobjectswhereid=object_id(N'[dbo].[d_album]')andOBJECTPROPERTY(id,N'IsUserTable')=1)

droptable[dbo].[d_album]

GO

CreateTABLE[dbo].[d_album](

[ID][int]IDENTITY(1,1)NOTNULL,

[album_singer][int]NULL,

[file_img][nvarchar](100)COLLATEChinese_PRC_CI_ASNULL,

[album_name][nvarchar](100)COLLATEChinese_PRC_CI_ASNULL,

[album_lang][nvarchar](100)COLLATEChinese_PRC_CI_ASNULL,

[album_corp][nvarchar](100)COLLATEChinese_PRC_CI_ASNULL,

[album_time][nvarchar](100)COLLATEChinese_PRC_CI_ASNULL,

[album_intro][ntext]COLLATEChinese_PRC_CI_ASNULL,

[is_singer_album][bit]NULL,

[view_count][int]NULL,

[is_putup][bit]NULL,

[add_time][datetime]NULL,

[album_7xi][int]NULL,

[is_down][bit]NULL

)ON[PRIMARY]TEXTIMAGE_ON[PRIMARY]

GO

AlterTABLE[dbo].[d_album]WITHNOCHECKADD

CONSTRAINT[PK_d_album]PRIMARYKEYCLUSTERED

(

[ID]

)ON[PRIMARY]

GO

d_mp3----歌曲信息表

ifexists(select*fromdbo.sysobjectswhereid=object_id(N'[dbo].[d_mp3]')andOBJECTPROPERTY(id,N'IsUserTable')=1)

droptable[dbo].[d_mp3]

GO

CreateTABLE[dbo].[d_mp3](

[ID][int]IDENTITY(1,1)NOTNULL,

[mp3_name][varchar](200)COLLATEChinese_PRC_CI_ASNULL,

[mp3_album][int]NULL,

[mp3_singer][int]NULL,

[file_rm][varchar](100)COLLATEChinese_PRC_CI_ASNULL,

[file_size][varchar](20)COLLATEChinese_PRC_CI_ASNULL,

[is_putup][bit]NULL,

[mp3_lyric][varchar](5000)COLLATEChinese_PRC_CI_ASNULL,

[view_count][int]NULL,

[down_count][int]NULL,

[is_my][bit]NULL,

[mp3_7xi][int]NULL,

[is_down][varchar](2)COLLATEChinese_PRC_CI_ASNULL

)ON[PRIMARY]

GO

AlterTABLE[dbo].[d_mp3]WITHNOCHECKADD

CONSTRAINT[PK_d_mp3]PRIMARYKEYCLUSTERED

(

[ID]

)ON[PRIMARY]

GO

【asp实现的7xi音乐网的采集源代码】相关文章:

实现ASP程序执行时间统计类的代码

ASP + Serv-u 实现FTP的代码

ASP实现URL编码

asp下tag的实现,简单介绍与部分代码

asp中实现随机分组程序的代码

用asp实现批量删除bak文件

用asp实现的代码批量修改程序,fso相关

ASP实现网址的桌面快捷方式下载

用ASP和SQL实现基于Web的事件日历

防止网站内容被小偷采集的ASP代码

精品推荐
分类导航