<%

' ===========================
'  Function to GetHTMLBin
' ===========================
Function GetHTMLBin(URLaddress)
Dim Http
Set Http = CreateObject("Microsoft.XMLHTTP")
Http.Open "GET", URLaddress, False
Http.Send
GetHTMLBin = Http.responseBody
Set Http = Nothing
End Function

' ===========================
'  Function to BinToText
' ===========================
Function BinToText(varBinData, intDataSizeInBytes)    ' as String
Const adFldLong = &H00000080
Const adVarChar = 200
Set objRS = CreateObject("ADODB.Recordset")
objRS.Fields.Append "txt", adVarChar, intDataSizeInBytes, adFldLong
objRS.Open
objRS.AddNew
objRS.Fields("txt").AppendChunk varBinData
BinToText = objRS("txt").Value
objRS.Close
Set objRS = Nothing
End Function

GetURL = "http://www.naver.com/"

HTMLBin = GetHTMLBin(GetURL)
html = BinToText(HTMLBin,32000) 

%>
<%=html%>

ResponseText를 이용하여 값을 받아서 출력하면 한글이 깨지게 됩니다. 그래서 바이너리타입으로 값을 전송하여 변환하는 함수를 이용하여 출력하는 방식입니다.



//