不信大家单独保存为asp试试,反正我电脑上的一个劲报毒
'过程名:SaveBeyondFile
'作 用:保存远程的文件到本地
'参 数:LocalFileName ------ 本地文件名
'参 数:RemoteFileUrl ------ 远程文件URL
'==================================================
Function SaveBeyondFile(LocalFileName,RemoteFileUrl)
on error resume next
Dim SaveRemoteFile:SaveRemoteFile=True
dim Ads,Retrieval,GetRemoteData
Set Retrieval = Server.CreateObject("Microsoft.XMLHTTP")
With Retrieval
.Open "Get", RemoteFileUrl, False, "", ""
.Send
If .Readystate<>4 then
SaveRemoteFile=False
Exit Function
End If
GetRemoteData = .ResponseBody
End With
Set Retrieval = Nothing
Set Ads = Server.CreateObject("Adodb.Stream")
With Ads
.Type = 1
.Open
.Write GetRemoteData
.SaveToFile server.MapPath(LocalFileName),2
.Cancel()
.Close()
End With
Set Ads=nothing
SaveBeyondFile=SaveRemoteFile
'加水印
Dim T:Set T=New Thumb
call T.AddWaterMark(LocalFileName)
Set T=Nothing
end Function