You are here

public static function CleantalkHelper::api_method__spam_check_cms in Anti Spam by CleanTalk 7.5

Same name and namespace in other branches
  1. 7.4 src/CleantalkHelper.php \CleantalkHelper::api_method__spam_check_cms()

* Function gets spam report * *

Parameters

string website host: * @param integer report days * @return type

2 calls to CleantalkHelper::api_method__spam_check_cms()
cleantalk_find_spam_comments in src/Form/CleantalkCheckCommentsForm.php
cleantalk_find_spam_users in src/Form/CleantalkCheckUsersForm.php

File

src/CleantalkHelper.php, line 455

Class

CleantalkHelper
Cleantalk's hepler class

Code

public static function api_method__spam_check_cms($api_key, $data, $date = null, $do_check = true) {
  $request = array(
    'method_name' => 'spam_check_cms',
    'auth_key' => $api_key,
    'data' => is_array($data) ? implode(',', $data) : $data,
  );
  if ($date) {
    $request['date'] = $date;
  }
  $result = self::api_send_request($request, self::URL, false, 6);
  $result = $do_check ? self::api_check_response($result, 'spam_check_cms') : $result;
  return $result;
}