PHPackages                             adriengras/php-clamav - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. adriengras/php-clamav

ActiveLibrary[Security](/categories/security)

adriengras/php-clamav
=====================

A PHP/Composer package to use ClamAV to scan folders and files for viruses

1.0.0(1y ago)38.2k↓38.1%MITPHPPHP ^8.0

Since Nov 7Pushed 1y ago1 watchersCompare

[ Source](https://github.com/AdrienGras/php-clamav)[ Packagist](https://packagist.org/packages/adriengras/php-clamav)[ Docs](https://github.com/AdrienGras/php-clamav)[ RSS](/packages/adriengras-php-clamav/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (5)Used By (0)

php-clamav
==========

[](#php-clamav)

[![](https://camo.githubusercontent.com/21ddec103ea0be62a4a3807ac27126a74ab1f5d290bcf7a7c7c0914bd4716dbc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344382e302d626c75653f7374796c653d666f722d7468652d6261646765266c6f676f3d706870)](https://camo.githubusercontent.com/21ddec103ea0be62a4a3807ac27126a74ab1f5d290bcf7a7c7c0914bd4716dbc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344382e302d626c75653f7374796c653d666f722d7468652d6261646765266c6f676f3d706870)[![](https://camo.githubusercontent.com/fc55991287fb31677daf1f951234583ab7894c80c8f63a37d0715c6412ef2222/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f74657374732d70617373696e672d677265656e3f7374796c653d666f722d7468652d6261646765266c6f676f3d676974687562616374696f6e73)](https://camo.githubusercontent.com/fc55991287fb31677daf1f951234583ab7894c80c8f63a37d0715c6412ef2222/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f74657374732d70617373696e672d677265656e3f7374796c653d666f722d7468652d6261646765266c6f676f3d676974687562616374696f6e73)

This is a PHP client for the [ClamAV](https://www.clamav.net/) virus scanner.

Features
--------

[](#features)

- 🛡️ Uses `clamd` for scanning.
- 📂 Supports scanning of files and directories.
- 🔌 Supports scanning of streams.
- 🔗 Supports of TCP and Unix sockets.
- ✨ Supports nearly all the methods provided by the `clamd` daemon. (e.g. `PING`, `VERSION`, `SCAN`, `CONTSCAN`, `INSTREAM`, `RELOAD`, `SHUTDOWN`)

Requirements
------------

[](#requirements)

- A ClamAV `clamd` daemon running with either TCP or Unix socket enabled.
- PHP `8.0` or higher with the `sockets` extension enabled.

> You can easily run a ClamAV `clamd` daemon using the official Docker image. More information can be found [here](https://docs.clamav.net/manual/Installing/Docker.html).

> ⚠️ This repository contains a `docker-compose.yml` file that you can use to run a ClamAV `clamd` daemon for testing purposes; but it is not recommended to use it in production.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require adriengras/php-clamav
```

Usage
-----

[](#usage)

First, you'll need an instance of the client:

```
