demonslay335 / malwr-api
病毒总库公共API v2.0 PHP包装器
dev-master
2016-04-04 03:09 UTC
Requires
- php: >=5.3.0
- guzzle/guzzle: >=3.6
Requires (Dev)
- phpunit/phpunit: >=4.0
This package is not auto-updated.
Last update: 2024-09-14 18:58:28 UTC
README
PHP包装器,用于公开的Malwr.com API。
API包装器基线代码借鉴自VirusTotal API。
用法
- 使用composer安装(https://composer.php.ac.cn/)
在您的composer.json中包含以下内容
{
"require": {
"demonslay335/malwr-api": "master"
}
}
composer update
快速入门
<?php
require_once('vendors/autoload.php');
$apiKey = 'your_api_key';
$file = new Malwr\File($apiKey);
$resp = $file->add('foo.txt');
var_dump($resp);
?>
示例输出
array(3) {
["status"] =>
string(5) "added"
["sha256"] =>
string(64) "14ebd45fc9162f8afc4fd10186a46d2fb9844bf27b9d3217fd9fdb4107f17acd"
["uuid"] =>
string(43) "YWFmYTEwYTIwZjkwNDdiYWJjMmU1MWQ2ZjY1MWU3OTY"
}
测试
phpunit --configuration tests/conf/phpunit.xml tests