PHP code example of mcrinquand / zabbix_monitoring

1. Go to this page and download the library: Download mcrinquand/zabbix_monitoring 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/ */

    

mcrinquand / zabbix_monitoring example snippets

 bash
$ php composer.phar 
 php

// app/AppKernel.php

public function registerBundles()
{
    $bundles = [
        // ...
        new MCD\ZabbixMonitoringBundle\MCDZabbixMonitoringBundle(),
    ];
}
 php


namespace AppBundle\Monitorer;

use MCD\ZabbixMonitoringBundle\Zabbix\Monitoring\AbstractMonitoring;

class VisitorMonitorer extends AbstractMonitoring
{
}
 php
$monitorer = $this->get('AppBundle\Monitorer\VisitorMonitorer');
// record one visitor
$monitorer->incrementValue();

// record four visitor
$monitorer->incrementValue(4);