function rate_bots_check_agent in Rate 7
Check if the given user agent matches the local bot database.
Parameters
string $agent:
Return value
bool
1 call to rate_bots_check_agent()
- rate_bots_is_blocked in ./
rate.bots.inc - Check if the current user is blocked.
File
- ./
rate.bots.inc, line 104
Code
function rate_bots_check_agent($agent) {
$sql = 'SELECT 1 FROM {rate_bot_agent} WHERE :agent LIKE pattern LIMIT 1';
return (bool) db_query($sql, array(
':agent' => $agent,
))
->fetchField();
}