Download the PHP package pato05/amphp-clamav without Composer

On this page you can find all versions of the php package pato05/amphp-clamav. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package amphp-clamav

amphp-clamav

license: MIT

An asynchronous ClamAV wrapper written with amphp/socket

Migrating from v1.x.x

The updated v2.0.0 brought some breaking changes because of the changes in the underlying amphp/amp. These underlying changes give a great boost to the asynchronous event loop, being it now based on Fibers instead of Generators.

Mostly you only need to remove the yield keyword before any calls to the library's asynchronous function. Learn more on Amp's Upgrade Guide.

Installing

Examples

Ping and scan of a file/directory: examples/scan.php

Scanning from a ReadableStream (in this case a File instance which implements ReadableStream): examples/scan_stream.php

Using a TCP/IP socket instead

If you want to use a TCP/IP socket instead of a UNIX one, you should use the ClamAV\clamav() function prior to any other call, or just use a custom ClamAV instance:

Be aware that TCP/IP sockets may be slightly slower than UNIX ones.

Using MULTISCAN

MULTISCAN is supported but can only be used on non-session instances (due to a ClamAV limitation).

MULTISCAN allows you to make a multithreaded scan.

Differences between running a session and without

Sessions run on the same socket connection, while non-session instances will reconnect to the socket for each command. The library supports both, it's up to you deciding which to use.

Instantiating a session is pretty straight forward, just use the ClamAV::session() method like this:

Though you MUST end every session by using the method Session::end():

Be aware that in a session you can only execute ONE COMMAND AT A TIME, therefore, if you want to run more than one command in parallel, use the main ClamAV class instead.

Multiple Sessions can also be instantiated.


All versions of amphp-clamav with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
amphp/amp Version ^3.0
amphp/socket Version ^2.0
ext-sockets Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package pato05/amphp-clamav contains the following files

Loading the files please wait ....