note 116135 deleted from snmp.construct by salathe

From: Date: Mon, 17 Nov 2014 15:53:18 +0000
Subject: note 116135 deleted from snmp.construct by salathe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-200929@lists.php.net to get a copy of this message
Note Submitter: GF ---- <?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.

« previous php.notes (#200929) next »