function rate_bots_check_botscout in Rate 7
Check if the IP is in the BotScout database.
Parameters
string $ip:
Return value
bool
1 call to rate_bots_check_botscout()
- rate_bots_is_blocked in ./
rate.bots.inc - Check if the current user is blocked.
File
- ./
rate.bots.inc, line 127
Code
function rate_bots_check_botscout($ip) {
$key = variable_get(RATE_VAR_BOT_BOTSCOUT_KEY, '');
if ($key) {
$url = "http://botscout.com/test/?ip={$ip}&key={$key}";
$data = drupal_http_request($url, array(
'timeout' => 2,
));
if ($data->code == 200) {
if ($data->data[0] == 'Y') {
return TRUE;
}
}
}
return FALSE;
}