3초기억력

ASP - 외부 URL 이미지 가져오기 본문

플밍_ASP

ASP - 외부 URL 이미지 가져오기

잠수콩 2011. 3. 25. 13:12
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.


<%
  img_url = "http://~~~경로"
  Set xh = CreateObject("MSXML2.ServerXMLHTTP")
  xh.Open "GET", img_url, false
  xh.Send()
  imgData = xh.ResponseBody
  Set  xh = Nothing

  Set stm =CreateObject("ADODB.Stream")
  stm.open()
  stm.type=1
  stm.write imgData
  stm.SaveToFile 저장경로&저장할이름, 2
  stm.close()
  Set  stm = Nothing
%>
Comments