'==================================================
' 원격지 파일을 읽어들인다.
' 호출 방법 : getSiteSourceGet( siteURL, params )
'==================================================
Function getSiteSourceGet( siteURL, params )
Set httpObj = Server.CreateObject("WinHttp.WinHttpRequest.5.1")
if Request.ServerVariables("HTTPS") = "on" then
if instr(1,siteURL,"https://") < 1 then
siteURL = "https://" & Request.ServerVariables("HTTP_HOST") & siteURL
end if
else
if instr(1,siteURL,"http://") < 1 then
siteURL = "http://" & Request.ServerVariables("HTTP_HOST") & siteURL
end if
End If
if len(params) > 0 then
httpObj.open "GET", siteURL & "?" & params, False
else
httpObj.open "GET", siteURL, False
end if
httpObj.Send()
httpObj.WaitForResponse
If httpObj.Status = "200" Then
getSiteSourceGet = httpObj.ResponseText
Else
getSiteSourceGet = null
End If
End Function
'개발팁( ASP )' 카테고리의 다른 글
임시비밀번호 만들기 (0) | 2013.07.12 |
---|---|
한글과 영문을 구분해서 문자열 잘라서 Return (0) | 2013.07.02 |
한글과 영문을 구분해서 문자열의 길이를 Return (0) | 2013.07.02 |