Download the PHP package shiftpi/metascan-api without Composer

On this page you can find all versions of the php package shiftpi/metascan-api. 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 metascan-api

ShiftpiMetascanApi

Client for Metascan Online Public API.

Installation

Using Composer

Enable module by adding

after you have required shiftpi/metascan-api in your composer.json.

Features

What is supported?

What is not supported?

Configuration

Add

to your application's config. You may want to use another HTTP client adapter. By default CURL is used. To use your own adapter, register ShiftpiMetascanApi\Http\Adapter and make sure it is an instance of Zend\Http\Client\Adapter\AdapterInterface.

Usage

Scan data

If you want to scan the whole content of a file, you should use the ScanService class. Retrieve an instance from the service manager by using the key ShiftpiMetascanApi\Service\Scan.

The second and third parameters are optional. If you upload an encrypted archive, Metascan Online can decrypt it if you provide the password as third parameter.

Lookup hash

A faster way checking files is looking up its hash. For that you can use the HashLookupService by retrieving ShiftpiMetascanApi\Service\HashLookup from the service manager.

The parameter should be a SHA256, SHA1 or MD5 hash. If the parameter has an other string length, than a supported algorithm produces, an exception will be thrown. Please note: If you lookup a hash Metascan does not know, a "Not Found" state will be returned. This does not mean, that the file is probably not malicious.

Testing

There are some test files for the services present. You have to copy the file test/config/config.local.php.dist to test/config/config.local.php and paste your API key in order to run those.
These are tests against the real API, which will produce real API requests (no mocks!). Therefore be careful running them and keep yor API limits in mind. ;-)

License

Licensed under the MIT license. See license file.


All versions of metascan-api with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
zendframework/zendframework Version ~2.4.2
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 shiftpi/metascan-api contains the following files

Loading the files please wait ....