<% Function GetUrlText(url) Dim lResolve, lConnect, lSend, lReceive Dim TextContent lResolve = 0 lConnect = 60 * 1000 lSend = 300 * 1000 lReceive =10 * 60 * 1000 Set Retrieval = Server.CreateObject("Msxml2.ServerXMLHTTP.3.0") Retrieval.setTimeouts lResolve, lConnect, lSend, lReceive Retrieval.Open "GET", (url), False Retrieval.Send 'TextContent = Retrieval.responseText dim GetUrlBody GetUrlBody=Retrieval.responseBody 'TextContent =bytes2BSTR(GetUrlBody) TextContent = bytesToBSTR( Retrieval.Responsebody,"gb2312") GetUrlText= TextContent end Function Function bytesToBSTR(body,Cset) dim str set objstream = Server.CreateObject(ourADODBStreamobj) 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 End Function%> <% dim IsBig5,content,localurl localurl = Server.Mappath(Request.ServerVariables("PATH_INFO")) if instr(1,localurl,"cganbig5",1) >0 then IsBig5 =True else IsBig5 =False end if url = "http://bbs.cgan.net/Dv_News.asp?GetName=new2008" content = GetUrlText(url) if IsBig5 then on error resume next dim tobig5obj set tobig5obj = Server.CreateObject("Hokoy.WordKit") content = tobig5obj.GBtoBig5(content ) set tobig5obj = nothing end if response.write content %>