<%
sub SaveRemoteFile(LocalFileName,RemoteFileUrl)
dim Ads,Retrieval,GetRemoteData
Set Retrieval = Server.CreateObject("Microsoft.XMLHTTP")
With Retrieval
.Open "Get", RemoteFileUrl, False, "", ""
.Send
GetRemoteData = .ResponseBody
End With
Set Retrieval = Nothing
Set Ads = Server.CreateObject("Adodb.Stream")
With Ads
.Type = 1
.Open
.Write GetRemoteData
.SaveToFile LocalFileName,2
.Cancel()
.Close()
End With
Set Ads=nothing
end sub
RemoteFileUrl = "http://www.it365cn.com/bbs/images/mainlogo.gif" '获取远程图片
FileExt = right(RemoteFileUrl,4) '获取远程图片的格式
'随机文件名称
randomize
ranNum = int(9*10^3*rnd)+10^3
dtNow = Now()
FileName = year(dtNow) & right("0" & month(dtNow),2) & right("0" & day(dtNow),2) & right("0" & hour(dtNow),2) & right("0" & minute(dtNow),2) & right("0" & second(dtNow),2) & ranNum & FileExt
LocalFileName = "./" '保存本地路径
if right(LocalFileName,1) <> "/" then LocalFileName = LocalFileName & "/"
SaveFile = server.mappath(LocalFileName & FileName)
SaveRemoteFile SaveFile, RemoteFileUrl '保存远程图片
response.write "保存成功,<a href=""" & LocalFileName & FileName & """ target=""_blank"">点击查看图片文件....</a>"
%>
这个函数取固定的图片.请问动态截取图片的功能如何实现???