public static function API::method__spam_check in Anti Spam by CleanTalk 9.1.x
Same name and namespace in other branches
- 8.4 src/lib/Cleantalk/Common/API.php \Cleantalk\Common\API::method__spam_check()
* Wrapper for spam_check API method. * Checks IP|email via CleanTalk's database. * *
Parameters
string $api_key: * @param array $data * @param null|string $date * @param bool $do_check * * @return array|bool|mixed
File
- src/
lib/ Cleantalk/ Common/ API.php, line 225
Class
- API
- CleanTalk API class. Mostly contains wrappers for API methods. Check and send mehods. Compatible with any CMS.
Namespace
Cleantalk\CommonCode
public static function method__spam_check($api_key, $data, $date = null, $do_check = true) {
$request = array(
'method_name' => 'spam_check',
'auth_key' => $api_key,
'data' => is_array($data) ? implode(',', $data) : $data,
);
if ($date) {
$request['date'] = $date;
}
$result = static::send_request($request, self::URL, 10);
$result = $do_check ? static::check_response($result, 'spam_check') : $result;
return $result;
}