Update list of bot UAs

This commit is contained in:
Skylar Ittner 2020-10-23 21:11:31 -06:00
parent ec3214d1f9
commit 892878313a
3 changed files with 4553 additions and 2524 deletions

File diff suppressed because it is too large Load Diff

4552
lib/crawler-user-agents.json Normal file

File diff suppressed because it is too large Load Diff

View File

@ -21,7 +21,7 @@ if (!$database->has("settings", ["AND" => ["siteid" => getsiteid(), "key" => "an
throw new Exception("Do-Not-Track header detected, skipping analytics");
}
$bots = json_decode(file_get_contents(__DIR__ . "/bots.json"), true);
$bots = json_decode(file_get_contents(__DIR__ . "/crawler-user-agents.json"), true);
foreach ($bots as $bot) {
if (preg_match('/' . $bot['pattern'] . '/', $_SERVER['HTTP_USER_AGENT'])) {
throw new Exception("Bot/crawler detected, skipping analytics");