public static function API::method__sfw_logs in Anti Spam by CleanTalk 8.4
Same name and namespace in other branches
- 9.1.x src/lib/Cleantalk/Common/API.php \Cleantalk\Common\API::method__sfw_logs()
 
* Wrapper for sfw_logs API method. * Sends SpamFireWall logs to the cloud. * *
Parameters
string $api_key: * @param array $data * @param bool $do_check * * @return array|bool|mixed
File
- src/
lib/ Cleantalk/ Common/ API.php, line 275  
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__sfw_logs($api_key, $data, $do_check = true) {
  $request = array(
    'auth_key' => $api_key,
    'method_name' => 'sfw_logs',
    'data' => json_encode($data),
    'rows' => count($data),
    'timestamp' => time(),
  );
  $result = static::send_request($request);
  $result = $do_check ? static::check_response($result, 'sfw_logs') : $result;
  return $result;
}