scan uploaded file for virus in user's machine using php

蹲街弑〆低调 提交于 2019-12-12 01:22:49

问题


Is there any way to scan the file uploaded by user in their machine using PHP?

I am creating a website using PHP, where I give users the privilege to upload files of any format. Now I want to scan the files uploaded by the users for any virus or malware. Also I want to scan it before placing it in the server.

Is there any Online sites available to scan those files? Or give me any other best way to achieve this.

I am using Xampp (phpmyadmin) in Windows.

Any Suggestion?


回答1:


There is a useful resource you can use for free: virustototal.com They have API to include in your PHP scripts as well.

The other option is to use ClamAV, but I'm not perfectly sure about this.




回答2:


"ClamAV is a free anti virus commonly used on server applications.

php-clamav is an extension for binding ClamAV to PHP. You can check their documentation." from What are my options to check for viruses on a PHP upload?



来源:https://stackoverflow.com/questions/29456896/scan-uploaded-file-for-virus-in-users-machine-using-php

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!