You are here

public static function API::method__security_mscan_files in Anti Spam by CleanTalk 9.1.x

Same name and namespace in other branches
  1. 8.4 src/lib/Cleantalk/Common/API.php \Cleantalk\Common\API::method__security_mscan_files()

* Wrapper for security_mscan_files API method. * Sends file to the cloud for analysis. * *

Parameters

string $api_key: * @param string $file_path Path to the file * @param array $file File itself * @param string $file_md5 MD5 hash of file * @param array $weak_spots List of weak spots found in file * @param bool $do_check * * @return array|bool|mixed

File

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

Class

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

Namespace

Cleantalk\Common

Code

public static function method__security_mscan_files($api_key, $file_path, $file, $file_md5, $weak_spots, $do_check = true) {
  $request = array(
    'method_name' => 'security_mscan_files',
    'auth_key' => $api_key,
    'path_to_sfile' => $file_path,
    'attached_sfile' => $file,
    'md5sum_sfile' => $file_md5,
    'dangerous_code' => $weak_spots,
  );
  $result = static::send_request($request);
  $result = $do_check ? static::check_response($result, 'security_mscan_files') : $result;
  return $result;
}