PHP code example of mrcnpdlk / snmp

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

    

mrcnpdlk / snmp example snippets


use Mrcnpdlk\Lib\Snmp\Agent;
use Mrcnpdlk\Lib\Snmp\Config;
use Mrcnpdlk\Lib\Snmp\Enum\Version;

    'version'   => Version::VER_1,
    'mibFiles'  => [__DIR__ . '/some_mib_file.MIB'],
]);

$oSnmp = new Agent($oConfig);

var_dump($oSnmp->get('masterVoltageL2.0'));