채집 에 관 한 함수 몇 개 제공(ASP)

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''strText 는 내용 을 자 르 려 는 부분 을 위 한 내용 을''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''주석 끝''''''''''''''''''''''''''''''''''''''Func'tion GetText(strText, strStartTag, strEndTag)dim intStartintStart = instr(strText, strStartTag)if intStart thenintStart = intStart + len(strStartTag)intEnd = InStr(intStart, strText, strEndTag)GetText = Mid(strText, intStart, intEnd - intStart)elseGetText = " "end ifEnd Function
''''%%%''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''gb 2312 로 UTF-8 이 라면...UTF-8''''''''주석 끝''''''''''''''기능 getHTTPPage(Path)t=GetBody(Path)getHTTPPage=Bytes ToBstr(t,gb 2312)End function
Function GetBody(url) on error resume next Set Retrieval = CreateObject("Microsoft.XMLHTTP") With Retrieval .Open "get", url, False, "", "" .Send GetBody = .ResponseBody End With Set Retrieval = Nothing End FunctionFunction BytesToBstr(body,Cset) dim objstream set objstream = Server.CreateObject("adodb.stream") objstream.Type = 1 objstream.Mode =3 objstream.Open objstream.Write body objstream.Position = 0 objstream.Type = 2 objstream.Charset = Cset BytesToBstr = objstream.ReadText objstream.Close set objstream = nothing End Function%>

좋은 웹페이지 즐겨찾기