' 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.empas.com" '사이트 주소
HTMLBin = GetHTMLBin(GetURL)
html = BinToText(HTMLBin,32000)
출처: taeyo.pe.kr
p.s 기존에 멍멍이님 것보다 빠르네요 ^^; 음...이걸 자주이용해야겠군요.
adFldLong, AppendChunk 추가내용입니다.
http://ec.dytc.ac.kr/resource/ado/mdamth01_9uuj.htm
'WEB > ASP / DotNet' 카테고리의 다른 글
| ASP servervariables (0) | 2007/06/07 |
|---|---|
| 대량메일 발송 (2) | 2007/06/07 |
| Microsoft.XMLHTTP에서 한글 깨짐 완벽 해결 (0) | 2007/06/07 |
| 컴포넌트를 이용한 블로그 XML RSS 구현 (0) | 2007/06/07 |
| ASP 기반에서의 트랙백 구현 (0) | 2007/06/07 |
| 날짜 변형 함수 ASP -> SQL DATETIME형으로 (0) | 2007/06/07 |




최근에 달린 댓글
링크
최근에 받은 트랙백
태그목록