PHP code example of niisan-tokyo / web-clamav-php
1. Go to this page and download the library: Download niisan-tokyo/web-clamav-php library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
niisan-tokyo / web-clamav-php example snippets
$scanner = \Niisan\ClamAV\ScannerFactory::create([
'driver' => 'remote',
'url' => 'example.com'
]);
if (! $scanner->scan($_FILE['userfile']['tmp_name'])) {
echo 'User file has a virus!';
}
[
'driver' => 'remote',
'url' => 'examle.com'
];
[
'driver' => 'remote'
'remote' => [
'host' => 'example.com'
]
];
[
'driver' => 'local',
'path' => '/var/run/clamav/clamd.ctl'
]