直接保存URL图像或网页到服务器本地的类(8)
Private Function GetWebData(byval StrUrl)
if StrUrl="" then
r_write "无效",1
exit function
end if
dim tempStr
tempStr=split(GetStrUrl,"/")
if tempStr(ubound(tempStr))="" or inStr(StrUrl,"/")=0 then
R_Write "未指定有效的URL",0
exit function
end if
dim Retrieval
Set Retrieval = Server.CreateObject("Microsoft.XMLHTTP")
With Retrieval
.Open "Get", StrUrl, False, "", ""
.Send
GetWebData =.ResponseBody
End With
Set Retrieval = Nothing
End Function
End Class
%>
<%
SUB saveUpload(GetUrl,SavePath,SaveName,mode)
dim chkInfo
if GetUrl="" then
call tform()
R_Write "<br>传输文件栏没有填写!",0
end if
set imgUp=new BoxInfoImg
if mode="1" and imgUp.imgName="unknow" then
call tform()
set imgUp=nothing
R_Write "<br>传输文件栏没有填写有效的图像URL!",0
end if
chkInfo=""
dim i,testStr,showStr
'限定格式
select case imgUp.imgType
case "png","jpg","bmp","gif"
if imgUp.width=0 or imgUp.height=0 or imgUp.imgSize=0 then
内容版权声明:除非注明,否则皆为本站原创文章。