add babbar's barkrowler bot

joe/no-view-count-for-crawlers
Joe 11 months ago
parent 8fed9cb2e4
commit a4a6a8bfe9
Signed by: joe
GPG Key ID: 8595A3F8F2CE1B74
  1. 2
      ext/image_view_counter/main.php

@ -40,7 +40,7 @@ class ImageViewCounter extends Extension
// Don't add view for common crawler user agents
$ua = $_SERVER["HTTP_USER_AGENT"] ?? "No UA";
$ua_arr = ['googlebot', 'yandexbot', 'yandex', 'petalbot', 'baiduspider', 'bingbot', 'msnbot', 'semrushbot', 'dataforseobot', 'dotbot', 'rogerbot', 'slurp', 'duckduckbot', 'sogou', 'exabot', 'facebot', 'facebook', 'ia_archiver', 'applebot'];
$ua_arr = ['googlebot', 'yandexbot', 'yandex', 'petalbot', 'baiduspider', 'bingbot', 'msnbot', 'semrushbot', 'dataforseobot', 'dotbot', 'rogerbot', 'slurp', 'duckduckbot', 'sogou', 'exabot', 'facebot', 'facebook', 'ia_archiver', 'applebot', 'barkrowler'];
foreach($ua_arr as $ua_part) {
if (str_contains(strtolower($ua), $ua_part)) {
return;

Loading…
Cancel
Save