http://community.9cbs.net/expert/topic/3720/3720043.xml?temp=.9098169
Function CutedPage (Scontent, Str, Mode) if scontent = "" "" "" "" "SCONTENT, STR) if Pos> = 0 Then if Mode = 0 THEN CUTEDPAGE = POS else CutedPage = POS LEN (STR) end if Else CutePage = LEN (SCONTENT) End if End Function
Function Bytes2Bstr2 (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 Bytes2Bstr2 = objstream.ReadText objstream.Close set objstream = nothing End Functionfunction getHTTPPage (url) on error resume next dim http set http = server.createobject ( "Microsoft.XMLHTTP") Http.open "GET", url, False http.send () if http.readystate <> 4 THENETES2BSTTTTPPAGE = bytes2bstr2 (http.responsebody, "gb2312") set http = Nothing if err.number <> 0 Then Err.clear End function%>