function rate_bots_check_ip in Rate 7
Check if the IP-address exists in the local bot database.
Parameters
string $ip:
Return value
bool
1 call to rate_bots_check_ip()
- rate_bots_is_blocked in ./
rate.bots.inc - Check if the current user is blocked.
File
- ./
rate.bots.inc, line 89
Code
function rate_bots_check_ip($ip) {
return (bool) db_select('rate_bot_ip', 'rbi')
->fields('rbi', array(
'id',
))
->condition('rbi.ip', $ip)
->range(0, 1)
->execute()
->fetchField();
}