I want to integrate antivirus plugin in my code ( To check the files when users are uploading or downloading, Like yahoo mail). How do we integrate an antivirus component inside PHP? Any ideas or help would be appreciated. Thanks a bunch.

Comments

Do you have Anti-Virus software running on your web server that you can interface through the command line? This is not going to be a trivial task.

Written by Pekka

@pekka, I need to integrate one. Which would be best pick for integration?

Written by Dinzy

@Dinzy I don't know, but you'll probably need to provide more info to have a chance to get an answer: What operating system you are on, what kinds of files you are planning to scan, what kind of budget you have....

Written by Pekka

Im on Windows Platform, Files includes everything from pictures,Zipped files,Text files etc

Written by Dinzy

@Dinzy You may have to work through en.wikipedia.org/wiki/List_of_antivirus_software and see which ones can be used through the command line. As @Gordon says ClamAV seems to provide an interface and a PHP library, it may be worth a look

Written by Pekka

@Pekka, Thanks man. Im on it. Will try my best to Integrate AV.

Written by Dinzy

Accepted Answer

That depends on which AV solution you are using. If there is no bindings for PHP for that particular solution, you have to see if you can trigger the av check through system or exec calls.

An example of an AV solution that actually does provide bindings for usage with PHP would be

Written by Gordon
This page was build to provide you fast access to the question and the direct accepted answer.
The content is written by members of the stackoverflow.com community.
It is licensed under cc-wiki