개발/classic asp
asp 에서 img 태그에 image 이미지 url 숨기기 - 경로 감추기
마스타
2014. 2. 25. 23:39
300x250
ㅁ asp 에서 이미지 태그 소스 경로 숨기기
classic asp 에서 img 태그의 src 에 이미지 경로를 숨겨야 할 필요성이 있을 때, 아래 소스를 사용할 수 있다.
<%
dim image_url : image_url = "http://www.daum.net/image/tistory.gif"
Response.ContentType = "image/gif"
Set xh = CreateObject("MSXML2.ServerXMLHTTP")
xh.Open "GET" , image_url , false
xh.Send
binBody = xh.responseBody
Set xh = nothing
Response.BinaryWrite binBody
%>
물론, 파일명 부분을 파라미터로 받아서 사용할 수도 있다.
300x250