A ScanCloud powered, ready to use PHP class and examples.

The scripts are up open source on GitHub and contain ample comments, so you can fork them and modify as you wish.

Also see PHP Kit Listing


Download from secplugs.class.php. Or simply run the commands below in your working directory.

curl -o ./secplugs.class.php

You’ll now have all the PHP class in the directory ready to use.


Usage pattern is to instanciate a client and then use its methods to scan items

Scan A File

Usage is simple, past the below into a php file in the same directory that you downloaded secplugs.class.php to. The code will write file to a temp location and then scan it.

require_once dirname(__FILE__).'/secplugs.class.php';

$file_scanner = new Secplugs();

// Test eicar
$eicar_file = '/tmp/';
file_put_contents($eicar_file, $data);
$res = $file_scanner->isClean($eicar_file);
if ($res) {

// Test clean file
$clean_file = $argv[0];
$res = $file_scanner->isClean($clean_file);
if (!$res) {

Use Your Own API Key

To use additional features and the privacy of your own account, after registering with ScanCloud, sign in with your username and create an API key

After creating a key, the only change to the code sample above would be

$file_scanner = new Secplugs("your-api-key");

Everything else remains the same.


Having trouble? Contact ScanCloud