Pleasure resort of Gleam™

<%
'-------------------------------------------
Function GET_HTTP (sURL)
    Dim     lsResult
    Const    adFldLong    = &H00000080
    Const    adVarChar    = 200
    'XMLHTTP를 이용하여 전송
    With Server.CreateObject("Msxml2.ServerXMLHTTP")
        .Open "POST", sURL, False
        .Send
        lsResult = .responseBody
    End With
    
    '받은 결과값을 한글 인코딩 처리
    With Server.CreateObject("ADODB.Recordset")
        .Fields.Append "txt", adVarChar, LenB(lsResult), adFldLong
        .Open
        .AddNew
        .Fields("txt").AppendChunk lsResult
        GET_HTTP = .Fields("txt").Value
        .Close
    End With
    
    Set lsResult = Nothing
End Function
'-------------------------------------------


Response.Write(GET_HTTP ("http://gleam.pe.kr/"))
%>

From: 뉴스그룹 정영탁

Comment +0