PHP code example of indiana-university / php-gravityzone-api

1. Go to this page and download the library: Download indiana-university/php-gravityzone-api 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/ */

    

indiana-university / php-gravityzone-api example snippets


use IndianaUniversity\GravityZone\GravityZone;

$gz = new GravityZone(
    'gravityzone.example.net',
    'your api key goes here'
);

$quarantinedItems = json_decode($gz->getQuarantineItemsList('computers'));
foreach ($quarantinedItems->result->items as $item) {
    print_r($item);
}
bash
$ composer