TechniqueUse the snmpget () function to retrieve the value of a specified object: <?php $contact = snmpget("localhost", "public", "system.SysContact.0"); print "The system contact is $contact"; ?> CommentsThe snmpget() function gets the value of an SNMP object (in this case, "system. SysContact.0" ) for a specified community (in this case, "public" ) on a specified server (in this case, "localhost" ). The same two optional arguments discussed earlier ”timeout and number of retries ”can be supplied to this function as well. |