function _simpleads_is_bot_detected in SimpleAds 7.2
Return TRUE if the visitor is a bot.
2 calls to _simpleads_is_bot_detected()
- simpleads_node_stats_count_clicks in ./
simpleads.pages.inc - Count clicks.
- simpleads_node_stats_count_impressions in ./
simpleads.pages.inc - Count impressions.
File
- includes/
helper.inc, line 331 - Helper functions.
Code
function _simpleads_is_bot_detected() {
if (isset($_SERVER['HTTP_USER_AGENT']) && preg_match('/bot|crawl|slurp|spider/i', $_SERVER['HTTP_USER_AGENT'])) {
return TRUE;
}
else {
return FALSE;
}
}