% '****************************************************************' ' Food Script .asp version version 4.03062700 ' ' Copyright (C) 1997,1998,1999,2000 Beyond Engineering ' ' All Rights Reserved ' ' Resale and distribution strictly prohibited ' ' Note: Users of this script must have a purchase agreement on ' ' file with Beyond Engineering. ' ' Food Script is a trademark of Beyond Engineering ' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' ' ' SETUP ' ' You will need to modify this section to fit your settings ' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'SPECIFY THE DIRECTORY THAT THE TEMPLATE FILES ARE AT ' 'You will need the trailing "\" ' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' TemplatePath = "W:\clients\affund\grants\food\" IPpath = "w:\clients\IPSfile\" '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'PAGE ASSIGNMENTS. THESE FILES MUST BE IN THE PATH INDICATED ' 'PREVIOUSLY BY 'TemplatePath' ABOVE. ' '************************* NOTE *****************************' 'IF A PAGE ASSIGNMENT IS A WEB ADDRESS STARTING WITH "HTTP:" ' 'THEN THE SCRIPT WILL PERFORM A REDIRECT INSTEAD ' 'YOU WOULD USE THIS FEATURE IF YOU WANTED TO REDIRECT NORMAL ' 'BROWSERS TO AN ASP PAGE FOR PROCESSING. ' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Normal_Page = "index-frm.asp" Generic_Page = "index-frm.asp" AltaVista_Page = "index-1.html" DirectHit_Page = "index-1.html" Excite_Page = "index-1.html" HotBot_Page = "index-4.html" Infoseek_Page = "index-1.html" Lycos_Page = "index-1.html" NLSearch_Page = "index-1.html" Google_Page = "index-1.html" Fast_Page = "index-1.html" IPFile= "seo-ips.txt" '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'DETERMINE IF YOU WANT TO ACTIVATE BROWSER DETECTION OR NOT ' 'DetectBrowsers = FALSE 'Do not detect browsers (For Testing)' 'DetectBrowsers = TRUE 'Detect Browsers (When Live) ' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' DetectBrowsers = TRUE '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' ' ' END SETUP ' ' You will not need to change anything beyond this point. ' '****************************************************************' '****************************************************************' ' ' ' MAIN PROGRAM - DO NOT MODIFY! ' ' ' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' SET fso = CreateObject("Scripting.FileSystemObject") GoOn = TRUE IF NOT DetectBrowsers THEN '# bypass browser checking '# assign generic FoodFile just IN case FoodFile = generic_page ELSEIF LEN(TRIM(Request.ServerVariables("HTTP_VIA")&Request.ServerVariables("HTTP_REFERER"))) > 0 THEN '# this is definitely NOT a search engine robot - proxy check check_engine=99 redirect() GoOn = FALSE ELSEIF InStr(UCase(Request.ServerVariables("HTTP_CONNECTION")),"ALIVE") > 0 and NOT InStr(Request.ServerVariables("HTTP_FROM"),"@") > 0 THEN '# this is NOT search engine robot - check FOR Ultraseek spoof check_engine=99 redirect() GoOn = FALSE ELSEIF InStr(UCase(Request.ServerVariables("HTTP_PRAGMA")),"NO-CACHE") > 0 and NOT InStr(Request.ServerVariables("HTTP_FROM"),"@") > 0 THEN '# this is NOT search engine robot - check FOR Ultraseek spoof check_engine=99 redirect() GoOn = FALSE '# added to check for go translator ELSEIF InStr(UCase(Request.ServerVariables("HTTP_RANGE")),"BYTES") > 0 THEN '# this is NOT search engine robot - check FOR Ultraseek spoof check_engine=99 redirect() GoOn = FALSE '# end go translator check ELSE '# assign generic FoodFile just IN case FoodFile=generic_page END IF IF GoOn THEN IF fso.FileExists(IPpath & IPFile) THEN SET ReadIPFile = fso.OpenTextFile(IPpath & IPFile,1,0) DIM engines REDIM engines(0) count = 0 DO UNTIL ReadIPFile.AtENDOfStream engines(count) = ReadIPFile.Readline count = count + 1 REDIM Preserve engines(count) LOOP ReadIPFile.Close check_url() redirect() ELSE msg = "