View Full Version : Virus Scanner

08-16-2007, 01:30 AM

What I am wanting to do is scan all files, which I upload to my server using PHP, for viruses, and if virus are detected then reject the files from being uploaded. I don't want there to be a risk to my server. I want to also integrate the same virus scanner to scan all incoming email attachments for viruses as well. The attachments when they are sent through my email server are loaded into a MySQL database in a binary field in my email attachments table. Is it possible to scan the file binaries from the database when they are entered as well using the same virus scanner as is connected to my PHP upload script.


08-16-2007, 02:29 AM
exec() (http://php.net/function.exec.php)?

08-16-2007, 03:32 AM
hmmm... rafiki's link seems not to work... here is another attempt:



08-16-2007, 09:26 PM
If you use ClamAV(which most non-windows servers do, and some windows I think?) you can use this PHP extension (http://www.phpclamavlib.org/)(though it hasn't been updated in a while), and most e-mail servers can be integrated with Clam.