<%
'最初にリモート画像をダウンロードしてください
url =/"http://www.im286.com/image...'Remote画像アドレス
savepath =/"d:/photo //" 'パスを保存します
'ファイルの名前を変更します
ランダム化
rannum = int(999*rnd)
filename = year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)&rannum
'ファイルの名前を変更します
setXmlhttp = server.createObject(/"microsoft.xmlhttp/")
xmlhttp.open/"get/"、urllnfalse
xmlhttp.send
img = xmlhttp.responsebody
setxmlhttp =何もない
setobjadostream = server.createObject(/"adodb.stream/")
objadostream.open()
objadostream.type = 1
objadostream.write(img)
objadostream.savetofile(SavePath&//"。JPG/")
objadostream.seteos
setobjadostream =何もない
'ファイルのダウンロード終了
setupload = server.createObject(/"persits.upload/") 'オブジェクトを開く
setfile = upload.openfile(savepath&filename&/"。jpg/") '保存されたファイルを開きます
iffile.imageType <>/"jpg/" andfile.imagetype <>/"gif/" andfile.imagetype <>/"bmp/" andfile.imagetype <>/"png/" then
upload.deletefilesavepath&//"。jpg/" '形式が正しくない場合は、このダウンロードした画像を削除します
Response.write/"エラー画像形式/"
endif
'インスタンスからログオフします
setupload =何もない
setFile = Nothing
%>