<%
'先下载远程图片
url="
http://www.baidu.com/img/logo.gif" '远程图片地址
savepath="e:\www\www9551cn" '保存路径
'给文件重命名
randomize
ranNum=int(999*rnd)
filename=year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)&ranNum
'文件重命名结束
set xmlhttp=server.createobject("Microsoft.XMLHTTP")
xmlhttp.open "get",url,false
xmlhttp.send
img = xmlhttp.ResponseBody
text=xmlhttp.ResponseText
set xmlhttp=nothing
set objAdostream=server.createobject("ADODB.Stream")
objAdostream.Open()
objAdostream.type=1
objAdostream.Write(img)
objAdostream.SaveToFile(savepath&filename&".jpg")
objAdostream.SetEOS
set objAdostream=nothing
'文件下载结束
%>
posted on 2007-04-05 13:12
kelly 阅读(1486)
评论(3) 编辑 收藏 所属分类:
others