3초기억력

ASP - URL 파일 서버경로에 저장하기 ( binary, xmlDOM ) 본문

플밍_ASP

ASP - URL 파일 서버경로에 저장하기 ( binary, xmlDOM )

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


제목 : ASP - URL 파일 서버경로에 저장하기 ( binary, xmlDOM )


'******************************************************

'*

'* URL 파일 서버경로에 저장하기

'*

'*******************************************************

Function remoteCopy(baseObj,tagetObj)
'baseObj : url 경로
'tagetObj : 서버 경로 

'On Error Resume Next

  Dim xmlDOM

Set xmlDOM = CreateObject("WinHttp.WinHttpRequest.5.1")

xmlDOM.Open "GET", Trim(baseObj), False

xmlDOM.Send()

On Error Resume Next

      Dim Stream

Set Stream = CreateObject("ADODB.Stream")

Stream.Type = 1          'adTypeBinary

Stream.Open

Stream.Write xmlDOM.responseBody

Stream.SaveToFile tagetObj, 2 'adSaveCreateOverWrite

Stream.Close

Set Stream =Nothing


Set xmlDOM = Nothing

End Function



내용 : URL 경로의 파일을 binary로 읽어서 서버경로에 저장하기


출처 : 



Comments