You are here

public static function API::method__sfw_logs in Anti Spam by CleanTalk 8.3

* 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

1 call to API::method__sfw_logs()
SFW::send_logs in src/lib/Cleantalk/Antispam/SFW.php

File

src/lib/Cleantalk/Common/API.php, line 271

Class

API
CleanTalk API class. Mostly contains wrappers for API methods. Check and send mehods. Compatible with any CMS.

Namespace

Drupal\cleantalk\lib\Cleantalk\Common

Code

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;
}