<% Function GetWebData(byval strUrl) dim curlpath dim Retrieval Set Retrieval = Server.CreateObject("Microsoft.XMLHTTP") With Retrieval .Open "Get", strUrl, False, "", "" .Send GetWebData =.ResponseBody End With Set Retrieval = Nothing End Function
sub SaveImg(FileName,Data) set ads=server.CreateObject("Adodb.Stream") with ads .Type=1 .Open .Write Data .SaveToFile server.MapPath(FileName),2 .Cancel() .Close() end with set ads=nothing end sub
dim imgurl dim aryFileName imgurl="http://bbs.dvbbs.net/images/LOGO.GIF" '图片远程地址。 aryFileName=split(imgUrl,"/") call SaveImg(aryFileName(ubound(aryFileName)),GetWebData(imgurl)) %>