Changeset 28935 for extensions/no_stats_for_robots/main.inc.php
- Timestamp:
- Jul 3, 2014, 3:47:18 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/no_stats_for_robots/main.inc.php
r28022 r28935 14 14 } 15 15 16 $bots = array( 17 'Googlebot', 18 'bingbot', 19 'Baiduspider', 20 'yandex', 21 'AhrefsBot', 22 'msnbot', 23 'Slurp', 24 'BLEXBot', 25 'VoilaBot', 26 ); 27 16 28 if (isset($_SERVER["HTTP_USER_AGENT"]) 17 and preg_match('/( Googlebot|bingbot|Baiduspider|yandex|AhrefsBot|msnbot|Slurp)/', $_SERVER['HTTP_USER_AGENT']))29 and preg_match('/('.implode('|', $bots).')/', $_SERVER['HTTP_USER_AGENT'])) 18 30 { 19 31 add_event_handler('pwg_log_allowed', create_function('', 'return false;'));
Note: See TracChangeset
for help on using the changeset viewer.