一区二区三区在线-一区二区三区亚洲视频-一区二区三区亚洲-一区二区三区午夜-一区二区三区四区在线视频-一区二区三区四区在线免费观看

服務(wù)器之家:專注于服務(wù)器技術(shù)及軟件下載分享
分類導(dǎo)航

PHP教程|ASP.NET教程|Java教程|ASP教程|編程技術(shù)|正則表達(dá)式|C/C++|IOS|C#|Swift|Android|VB|R語言|JavaScript|易語言|vb.net|

服務(wù)器之家 - 編程語言 - ASP教程 - 非常不錯(cuò)的flash采集程序測試通過

非常不錯(cuò)的flash采集程序測試通過

2019-10-29 14:35asp教程網(wǎng) ASP教程

非常不錯(cuò)的flash采集程序測試通過

代碼如下:



<% 
'-------------------------------------------------------------- 
 Dbname = "../data/flash.mdb"          '更改數(shù)據(jù)庫文件位置,強(qiáng)烈建議更改為.asp的文件! 
 Set Conn = Server.CreateObject("ADODB.Connection") 
 Connstr = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Server.Mappath(Dbname) 
 Conn.Open Connstr 


'------------------------------------------------------------ 
 Set List = Conn.Execute("Select * From System") 
 WebName = List("WebName") 
 WebUrl = List("WebUrl") 
 webemail = List("webemail") 
 zzname = List("zzname") 
 qq = List("webqq") 

%>

 

復(fù)制代碼代碼如下:


<% 
if request("id") and request("overid") and request("download") <>"" then 
response.redirect "getid.asp?id="&request("id")&"&overid="&request("overid")&"&download="&request("download") 
else 
%> 
<body> 
<P> </P> 
<form name="form1" method="get" action="getid.asp"> 
  開始采集的專輯ID號(hào):  
  <input name="id" type="text" id="id" size="10"> 
  結(jié)束ID:  
  <input name="overid" type="text" id="overid" size="10"> 
  是否將數(shù)據(jù)下載到本地: 是 
<input type="radio" name="download" value="yes"> 
  否 
  <input name="download" type="radio" value="no" checked> 
  <input type="submit" name="Submit" value="提交"> 
</form> 
</body> 
</html> 
<%end if%>

 

復(fù)制代碼代碼如下:


<!-- #include File="Conn.asp" --> 
<% 
Server.ScriptTimeOut=999999999 
%> 
<% 
if request("overid")="" then 
response.write "結(jié)束ID不可為空" 
response.end 
elseif request("download")="" then 
response.write "請選擇是否下載" 
response.end 
end if 
if request("id")=request("overid") then 
response.write "采集任務(wù)結(jié)束" 
response.end 
end if 
gourl1=request("id") 
gourl1=gourl1+1 
%> 
<% 
function GetPy(Str) 
for i=1 to len(Str) 
GetPy=GetPy&GetPyChar(mid(Str,i,1)) 
next 
end function 

Function GetURL(url)  
Set Retrieval = CreateObject("Microsoft.XMLHTTP")  
With Retrieval  
.Open "GET", url, False 
.Send  
GetURL = bytes2bstr(.responsebody) 
if len(.responsebody)<100 then 
response.write "獲取遠(yuǎn)程文件 <a href="&url&" target=_blank>"&url&"</a> 失敗。" 
response.write"<meta http-equiv=""refresh"" content=""0;URL=getid.asp?id="&gourl1&""">" 
response.end 
end if 

End With  
Set Retrieval = Nothing  
End Function 
function bytes2bstr(vin)  
strreturn = ""  
for i = 1 to lenb(vin)  
thischarcode = ascb(midb(vin,i,1))  
if thischarcode < &h80 then  
strreturn = strreturn & chr(thischarcode)  
else  
nextcharcode = ascb(midb(vin,i+1,1))  
strreturn = strreturn & chr(clng(thischarcode) * &h100 + cint(nextcharcode))  
i = i + 1  
end if  
next  
bytes2bstr = strreturn  
end function 

Function GetKey(HTML,Start,Last) 
filearray=split(HTML,Start) 
filearray2=split(filearray(1),Last) 
GetKey=filearray2(0) 
End Function 


'------------------------------------ 
Function SaveRemoteFile(s_LocalFileName, s_RemoteFileUrl) 
    Dim Ads, Retrieval, GetRemoteData 
    Dim bError 
    bError = False 
    SaveRemoteFile = False 
    On Error Resume Next 
    Set Retrieval = Server.CreateObject("Msxml2.ServerXMLHTTP") 
    With Retrieval 
        .Open "GET", s_RemoteFileUrl, False 
        .Send 
        If .Status = 200 Then 
            GetRemoteData = .ResponseBody 
        Else 
            bError = True 
        End If 
    End With 
    Set Retrieval = Nothing 

    If Not bError Then 
        Set Ads = Server.CreateObject("Adodb.Stream") 
        With Ads 
            .Type = 1 
            .Open 
            .Write GetRemoteData 
            .SaveToFile Server.MapPath(s_LocalFileName), 2 
            .Cancel() 
            .Close() 
        End With 
        Set Ads=nothing 
    End If 

    If Err.Number = 0 And Not bError Then 
        SaveRemoteFile = True 
    Else 
        Err.Clear 
    End If 
End Function 

%> 



<% 
flashId=Request("Id") 

Url="http://www.gameyes.com/swf/"&flashid&".htm"  

Html = GetURL(Url)  

num=len(html) 

if num<600 then 

response.write "此頁不存在,跳轉(zhuǎn)下一個(gè)........<meta http-equiv=""refresh"" content=""0;URL=getid.asp?id="&gourl1&"&overid="&request("overid")&"&download="&request("download")&""">" 

response.end 

end if 

nclassid1=GetKey(Html,"FLASH游戲 >> <a class=a href=../list/a_",".htm>") 

nclass=GetKey(Html,"<a class=a href=../list/a_"&nclassid1&".htm>","</a>") 

nclass=nclass&"類" 

classid1=GetKey(Html,"class=a href='../list/",".htm'>") 

classname=GetKey(Html,"class=a href='../list/"&classid1&".htm'>","</a>") 

body=GetKey(Html,"<div id=""view_intro"">","</div>") 

body=replace(body,"<tr>","") 

body=replace(body,"<td>","") 

pic1=GetKey(Html,"#secrt{background:url(../smallpic",") 2 2 no-repeat;border:1px") 

pic1=replace(pic1,"_b.gif",".gif") 

pic1=replace(pic1,"_b.jpg",".jpg") 

pic="http://www.gameyes.com/smallpic"&pic1 

pictype=right(pic,4) 

flashurl=GetKey(Html,"download.asp?id="&flashid&"&swf=","""><img src=") 

flashurl=replace(flashurl,"http://old.gameyes.com/flash","http://60.191.9.222/flash") 

flashurl="http://old.gameyes.com/flash"&flashurl 

flashname=GetKey(Html,"<title>","小游戲 休閑小游戲網(wǎng) gameyes.com</title>") 

%> 
<% 
response.write "<font color=red>FLASH名稱:</font>  "&flashname 
response.write "<br>" 
response.write "<font color=red>所屬大類:</font>  "&nclass 
response.write "<br>" 
response.write "<font color=red>所屬二類:</font>  "&classname 
response.write "<br>" 
response.write "<font color=red>游戲介紹:</font>  "&body 
response.write "<br>" 
response.write "<font color=red>游戲小圖:</font>  "&pic 
response.write "<br>" 
response.write "<font color=red>FLASH地址:</font>  "&flashurl 
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采集完畢,繼續(xù)采集下一個(gè)<br><hr>" 
End If 
end if 
%> 



<% 
DBPath = Server.MapPath("../data/flash.mdb") 
set Conn=server.createobject("adodb.connection") 
'程序制作:cnwlg 聯(lián)系方式qq:276496487 email:[email protected] 
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的二級(jí)類別,如數(shù)據(jù)庫中沒有該類別,則增加 
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 
Rst.AddNew 
End If 
  rst("name")=classname 
  rst("classid")=nclassid 
  Rst.Update 
'程序制作:cnwlg 聯(lián)系方式qq:276496487 email:[email protected] 
Rst.Close 
Set Rst = Nothing 
 '取類別的ID號(hào) 
 Set rsc = Conn.Execute("select * from class where name='"&classname&"'") 
 classid=rsc("id") 
 rsc.close 
 set rsc=nothing 
'=================================================== 
'可以開始寫入flash 
set rs=server.CreateObject("ADODB.RecordSet") 
Sql="Select * From flash Where flashname='"&flashname&"' and flashurl='"&flashurl&"'" 
Rs.Open Sql,Conn,1,3 
If Rs.Eof And Rs.Bof Then 
Rs.AddNew 
End If 
  rs("flashname")=flashname 
if request("download")="yes" then 
  rs("flashurl")="../flashfile/"&request("id")&".swf" 
else 
  rs("flashurl")=flashurl 
end if 
  rs("nclass")=NClassID 
  rs("classid")=classid 
  rs("classname")=classname 
if request("download")="yes" then 
'程序制作:cnwlg 聯(lián)系方式qq:276496487 email:[email protected] 
  rs("pic")="../flashpic/"&request("id")&pictype 
else 
  rs("pic")=pic 
end if 
  rs("size")="500kb" 
  rs("sj")=now() 
  rs("body")=body 
  rs("tj")="no" 
  rs("hot")="1" 
  rs("user")="admin" 
  rs("zz")="未知" 
  rs("geshou")="不祥" 
  Rs.Update 
'程序制作:cnwlg 聯(lián)系方式qq:276496487 email:[email protected] 
Rs.Close 
Set Rs = Nothing 
conn.close 
set conn=nothing 
%> 
<% 
dim gourl 
gourl=flashid+1 
response.write"<meta http-equiv=""refresh"" content=""0;URL=getid.asp?id="&gourl&"&overid="&request("overid")&"&download="&request("download")&""">" 
%> 

延伸 · 閱讀

精彩推薦
主站蜘蛛池模板: 国产私人影院 | 干b视频在线观看 | 久99久热只有精品国产99 | 丰腴尤物贵妇浪荡小说 | 欧美xxxxx九色视频免费观看 | 国产a不卡片精品免费观看 国产aaa伦理片 | 欧美日韩一区二区综合在线视频 | 欧美日韩精品免费一区二区三区 | 午夜一区二区免费视频 | 国产99热 | 91av免费| 办公室强行丝袜秘书啪啪 | 亚洲成人mv | 亚洲乱亚洲23p女 | 亚洲福利视频一区 | 午夜宅男宅女看在线观看 | 亚洲福利二区 | 男人j桶进女人p桶爽 | 亚州笫一色惰网站 | 欧美日韩一区二区三区在线播放 | 久久国产精品免费网站 | 丝瓜视频黄色在线观看 | 无码人妻精品一区二区蜜桃在线看 | 精彩国产萝视频在线 | 十大免费批日的软件 | 国产一级精品高清一级毛片 | 日本花季传媒2020旧版安卓 | 亚洲一区二区三区不卡在线播放 | 奇米影视久久 | 91久久精品青青草原伊人 | sedog在线长片 | 青草青视频 | 四虎在线免费 | 息与子中文字幕在线 | 国产精品露脸国语对白河北 | 1314酒色| 日本三级在线观看免费 | 精品国产一区二区三区在线观看 | 欧美日韩亚洲国内综合网俺 | www.一区| 222aaa精品影院|