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

📄 downpic.asp

📁 一款不错的影音视频网站源代码。asp的程序。后台有自动采集功能
💻 ASP
字号:
<!-- #include file="../../inc/conn.asp" -->
<!-- #include file="function.asp" -->
<%call login_check()
if Request.QueryString("picurl")<>"" and Request.QueryString("id")<>"" then
FileName = Split(Request.QueryString("picurl"),"/")
if grabimage(Request.QueryString("picurl"),FileName(Ubound(FileName)))<>"" then
conn.execute("Update "&web_dbtop&"movie set moviepic='"&FileName(Ubound(FileName))&"',movietime='"&now()&"' where id="&Request.QueryString("id")&"")
end if
Response.Write Request.QueryString("uid")
end if

function grabimage(url,strFileName)
on error resume next
dim http,geturl,objStream
if CheckFileExt(url)<>true then
exit Function
end if
set http=server.createobject("MSXML2.XMLHTTP")
Http.open "GET",url,false
Http.send()
if Http.readystate<>4 then exit function
getHTTPimg=Http.responseBody
set http=nothing
if err.number<>0 then err.Clear 
Set objStream = Server.CreateObject("ADO"&"DB.Stream")
objStream.Type =1
objStream.Open
objstream.write getHTTPimg
objstream.SaveToFile server.MapPath("../../"&web_picdir&strFileName),2
objstream.Close()
set objstream=nothing
grabimage=strFileName
end function

function CheckFileExt(url)
ArrSaveFileName = Split(url,".")
strFileType=Lcase(ArrSaveFileName(Ubound(ArrSaveFileName)))
Forumupload="gif,jpg,bmp,jpeg,png" 
Forumupload=split(Forumupload,",") 
for i=0 to ubound(Forumupload) 
if strFileType=Forumupload(i) then 
CheckFileExt=true
exit Function
end if
next
end function
%>

⌨️ 快捷键说明

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