获取远程flash并保存到本地
2024-07-09 22:40:54
供稿:网友
复制代码 代码如下:
<%
'--------------------------------------------------------------
Dbname = "../data/flash.mdb" '更改数据库文件位置,强烈建议更改为.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")
%>
<%
Server.ScriptTimeOut=999999999
%>
<%
if request("overid")="" then
response.write "结束ID不可为空"
response.end
elseif request("download")="" then
response.write "请选择是否下载"
response.end
end if
if request("id")=request("overid") then
response.write "采集任务结束"
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 "获取远程文件 <a href="&url&" target=_blank>"&url&"</a> 失败。"
response.write"<meta http-equiv=""refresh"" content=""0;URL=getid.asp?"">"
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))