2008. 10. 22. 20:32

<%
' ===========================
'  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://totb.kr"

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

<%=html%>


Posted by ToTb