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)1053.8k↓23.8%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 1mo 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 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity37

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity48

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

1694d 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

[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M214](/packages/defuse-php-encryption)[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k16.7M113](/packages/mews-purifier)[robrichards/xmlseclibs

A PHP library for XML Security

41478.1M118](/packages/robrichards-xmlseclibs)[bjeavons/zxcvbn-php

Realistic password strength estimation PHP library based on Zxcvbn JS

87117.5M63](/packages/bjeavons-zxcvbn-php)[illuminate/encryption

The Illuminate Encryption package.

9229.7M280](/packages/illuminate-encryption)[paragonie/hidden-string

Encapsulate strings in an object to hide them from stack traces

7410.6M39](/packages/paragonie-hidden-string)

PHPackages © 2026

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