PHPackages                             niisan-tokyo/web-clamav-php - 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. niisan-tokyo/web-clamav-php

ActiveLibrary[Security](/categories/security)

niisan-tokyo/web-clamav-php
===========================

Anti virus scanner through web using php with clamav.

v0.3.0(4y ago)1060.0k↓61.2%2[1 PRs](https://github.com/niisan-tokyo/web-clamav-php/pulls)1MITPHPCI failing

Since Jul 26Pushed 3y ago1 watchersCompare

[ Source](https://github.com/niisan-tokyo/web-clamav-php)[ Packagist](https://packagist.org/packages/niisan-tokyo/web-clamav-php)[ RSS](/packages/niisan-tokyo-web-clamav-php/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (4)Dependencies (1)Versions (5)Used By (1)

Using clamav through web.
=========================

[](#using-clamav-through-web)

We can use clamav scan through remote network by this library.

Before using this library, we prepare a remote clamav server. For example, we can use a clamav container following:

```
docker run -d dinkel/clamavd

```

Usage
=====

[](#usage)

Execute following code.

```
require 'vendor/autoload.php';

$scanner = \Niisan\ClamAV\ScannerFactory::create([
    'driver' => 'remote',
    'url' => 'example.com'
]);

if (! $scanner->scan($_FILE['userfile']['tmp_name'])) {
    echo 'User file has a virus!';
}
```

If a file have some virus, `Scanner::scan` return false.

config
======

[](#config)

When you want know a config that is an argument of ScannerFactory, See example.config.php.

You can select driver, which 'remote' or 'local'. When yor select 'remote', the config need 'host' or 'remote.host' that means clamd host: following

```
[
    'driver' => 'remote',
    'url' => 'examle.com'
];
```

```
[
    'driver' => 'remote'
    'remote' => [
        'host' => 'example.com'
    ]
];
```

Or you select 'local', the config need 'path' or 'local.path', that means a unix socket of clamd.

```
[
    'driver' => 'local',
    'path' => '/var/run/clamav/clamd.ctl'
]
```

for developing
==============

[](#for-developing)

If you want to develop this package, some tests will fail for not starting clamd server. So you command `clamd start` to start clamav daemon before testing.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity37

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~143 days

Total

4

Last Release

1787d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/08f151b9c393859c06a9e1a1655392f43abbd9de6bd3533813728d3588e17cd6?d=identicon)[niisan-tokyo](/maintainers/niisan-tokyo)

---

Top Contributors

[![niisan-tokyo](https://avatars.githubusercontent.com/u/5599175?v=4)](https://github.com/niisan-tokyo "niisan-tokyo (10 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/niisan-tokyo-web-clamav-php/health.svg)

```
[![Health](https://phpackages.com/badges/niisan-tokyo-web-clamav-php/health.svg)](https://phpackages.com/packages/niisan-tokyo-web-clamav-php)
```

###  Alternatives

[phpids/phpids

PHPIDS (PHP-Intrusion Detection System) is a simple to use, well structured, fast and state-of-the-art security layer for your PHP based web application

791150.0k2](/packages/phpids-phpids)[paragonie/ecc

PHP Elliptic Curve Cryptography library

25866.3k44](/packages/paragonie-ecc)[sansec/magento2-module-shield

15218.6k](/packages/sansec-magento2-module-shield)[nicobleiler/php-passphrase

Passphrase generator with Laravel integration, inspired by Bitwarden. Uses the EFF long word list by default with support for custom wordlists.

4912.6k](/packages/nicobleiler-php-passphrase)[dwgebler/encryption

Encryption wrapper for PHP using libsodium — simple API for symmetric and asymmetric encryption, password hashing, digital signing, and message authentication.

317.5k](/packages/dwgebler-encryption)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
