<%
Set HttpObj = Server.CreateObject("WinHTTP.WinHTTPRequest.5.1")
HttpObj.setTimeouts 5000, 5000, 15000, 15000
HttpObj.open "GET", "http://www.nicklib.com/img/logo.jpg", False
HttpObj.send

BinaryData = HttpObj.responseBody
ContentType = HttpObj.getResponseHeader("Content-Type")
Set HttpObj = Nothing
If Not Response.IsClientConnected Then
Response.End
End If

Response.AddHeader "Content-Type", ContentType
Response.AddHeader "Content-Length", LenB(BinaryData)
'Response.AddHeader "Content-Disposition", "attachment; filename=" & Escape(filename)
Response.BinaryWrite BinaryData
Response.Flush
%>
<%
Function getSiteSourceGet( siteURL, params )
Set httpObj = Server.CreateObject("WinHttp.WinHttpRequest.5.1")
httpObj.open "GET", siteURL & "?" & params, False

httpObj.Send()
httpObj.WaitForResponse
If httpObj.Status = "200" Then
  getSiteSourceGet = httpObj.ResponseText
Else
  getSiteSourceGet = null
End If
End Function
%>

Copyright 조희창(Nicholas Jo). Some rights reserved. http://www.nicklib.com

'Dev > ASP' 카테고리의 다른 글

vb or asp 에서 다른 웹페이지 호출하기  (0) 2011.05.10

+ Recent posts