PHP code example of appwrite / php-clamav

1. Go to this page and download the library: Download appwrite/php-clamav 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/ */

    

appwrite / php-clamav example snippets




ppwrite\ClamAV\Network;

$clam = new Network('localhost', 3310); // Or use new Pipe() for unix socket

$clam->ping(); // Check ClamAV is up and running

$clam->version(); // Check ClamAV version

$clam->fileScan('path/to/file.dmg'); // Returns true if a file is clean or false if a file is infected

$clam->reload(); // Reload ClamAV database

$clam->shutdown(); // Shutdown ClamAV
bash
composer