Posted
Filed under asp,asp.net

영화 소개 사이트였던가 작업중 영화 이미지를 자기들이 등록하는게 아니고 url 로 등록하면 우리 서버에

저장되서 사이즈 조정을 거쳐 핸드폰에 출력해줘야 하는 일이 생겼었다.


PHP 보다 오히려 간단하게 처리되었다는..


  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 

2011/02/21 22:10 2011/02/21 22:10