1. Go to this page and download the library: Download monaz/vt-php-api3 library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
monaz / vt-php-api3 example snippets
Key = 'your_api_key';
// Scan file
$fileScanner = new \Monaz\VirusTotal\File($apiKey);
$resp = $fileScanner->scan('foo.txt');
$result = $fileScanner->getReport($resp['hash']);
// Scan Url
$urlScanner = new \Monaz\VirusTotal\Url($apiKey);
$resp = $urlScanner->scan('foo.txt');
$result = $urlScanner->getReport($resp['hash']);
// Get Domain Report
$domainScanner = new \Monaz\VirusTotal\Domain($apiKey);
$result = $domainScanner->getReport("domain.com");
// Get IP Report
$ipScanner = new \Monaz\VirusTotal\Ip($apiKey);
$result = $ipScanner->getReport("1.1.1.1");