Skip to content
forked from FileZ/php-clamd

php-clamd, a PHP interface to ClamAV Daemon.

Notifications You must be signed in to change notification settings

guoyu07/php-clamd

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

php-clamd v0.1

php-clamd is a PHP interface to ClamAV Daemon that allows you to scan files and emails effectively using ClamAV.

API Reference

TODO

Example

<?php

include_once '../clamd.php';

$EICAR_TEST = 'X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*';

file_put_contents('evil.txt', $EICAR_TEST);
file_put_contents('good.txt', 'PHP');

$clamd = new ClamdPipe();
// $clamd = new ClamdNetwork();

var_dump($clamd->ping());
var_dump($clamd->version());

var_dump($clamd->fileScan(getcwd() . '/evil.txt'));
var_dump($clamd->fileScan(getcwd() . '/good.txt'));

var_dump($clamd->continueScan(getcwd()));

var_dump($clamd->streamScan($EICAR_TEST));
var_dump($clamd->streamScan('PHP'));

if( $clamd->streamScan($EICAR_TEST) != 'OK' ) { echo 'Infacted' . PHP_EOL; }

// $clamd->reload();
// $clamd->shutdown();

?>

About

php-clamd, a PHP interface to ClamAV Daemon.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%