Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

VADE(host, opts)

Scans a message with Vade's Content Filter REST API.


  • host string - IP or hostname to the Vade service. Required.
  • opts array - options array

Returns: class object.

The following options are available in the opts array.

  • port number - TCP port. The default is 8080.
  • timeout number - Timeout in seconds. The default is 10 seconds.
  • tls array - TLS settings.
  • max_message_size number - The max message size in bytes. The default is 5 MiB.

The following options are available in the tls array.

  • enabled boolean - Enable TLS for the specific socket
  • opts array - All available options can be found on here


Scans a message


  • fp File - file object such as return type of GetMailFile(). Required.

Returns: associative array containing the result of the scan

Return type: array, when an error occur the "error" index is available.


Pings the Vade's service to check if it's responding

Returns: boolean


include "vade";

$vade = VADE("", ["port" => 8080, "tls" => ["enabled" => true]]);
$result = $vade->scan(GetMailFile());

if (!$result["error"]) {
    echo $result;
} else {
    echo "Error - ".$result["error"];