PHP code example of onurkose / snmp-wrapper

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

    

onurkose / snmp-wrapper example snippets




return [

    // ...

    'providers' => [
        // ...
        OnurKose\SNMPWrapper\SNMPWrapperServiceProvider::class,
    ],

    // ...

    'aliases' => [
        // ...
        'SNMPWrapper' => OnurKose\SNMPWrapper\Facades\SNMPWrapper::class,
    ],
];



namespace App\Http\Controllers;

use OnurKose\SNMPWrapper;

use App\Http\Controllers\Controller;

class SNMPController extends Controller
{

    public function get()
    {
        $snmp = new SNMPWrapper();
        
        $snmp::setHost('192.168.0.1', 'public');
        
        dd($snmp::get('.1.3.6.1.2.1.1.1.0'));
    }
}
config/app.php