<?php
$session = new SNMP(SNMP::VERSION_1, "127.0.0.1", "public");
$sysdescr = $session->get("sysDescr.0");
echo "$sysdescr\n";
?>
doesn't work for me, use it instead :
<?php
$version = "3"; // snmp version "1", "2" or "2c", "3"
$host = "127.0.0.1"; // hostname or ip
$community = "public"; // snmp community
$session = new SNMP($version, $host, $community);
$sysdescr = $session->get("sysDescr.0");
echo "$sysdescr\n";
?>
I don't use the snmp version 2 that's why i have written 2 or 2c, I'm not sure so test it.