获取远程flash并保存到本地(4)
response.write "<br>"
%>
<%
if request("download")="yes" then
response.write"开始下载FLASH<br>"
response.flush
result = SaveRemoteFile("../flashfile/"&request("id")&".swf",""&flashurl&"")
If result Then
Response.Write "<b>FLASH下载成功——保存在<a href=../flashfile/"&request("id")&".swf target=_blank>flashfile/"&request("id")&".swf</a><br>"
Else
Response.Write "<b>FLASH保存失败</b><br>"
End If
end if
if request("download")="yes" then
response.write"开始下载FLASH图片<br>"
response.flush
result = SaveRemoteFile("../flashpic/"&request("id")&pictype&"",""&pic&"")
If result Then
Response.Write "<b>FLASH图片下载成功——保存在<a href=../flashpic/"&request("id")&pictype&" target=_blank>flashpic/"&request("id")&pictype&"</a>"
Else
Response.Write "<b>FLASH图片保存失败</b><br>"
response.write "此FLASH采集完毕,继续采集下一个<br><hr>"
End If
end if
%>
<%
DBPath = Server.MapPath("../data/flash.mdb")
set Conn=server.createobject("adodb.connection")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath
set rs=server.CreateObject("ADODB.RecordSet")
Sql="Select * From class Where name='"&nclass&"'"
Rs.Open Sql,Conn,1,3
If Rs.Eof And Rs.Bof Then
Rs.AddNew
End If
rs("name")=nclass
rs("classid")="0"
Rs.Update
Rs.Close
Set Rs = Nothing
Set rsc = Conn.Execute("select * from class where name='"&nclass&"'")
nclassid=rsc("id")
rsc.close
set rsc=nothing
'处理FLASH的二级类别,如数据库中没有该类别,则增加
set rst=server.CreateObject("ADODB.RecordSet")
Sql="Select * From class Where name='"&classname&"'"
Rst.Open Sql,Conn,1,3
If Rst.Eof And Rst.Bof Then
内容版权声明:除非注明,否则皆为本站原创文章。