TechniqueUse the snmpset() function: <?php snmpset("localhost", "public", "system.SysContact.0", "s", "sterling@designmultimedia.com") or die("Cannot Set SNMP object"); ?> CommentsThe snmpset() function sets an SNMP object (in this case, "system.SysContact.0" ) of a certain type (in this case, a string "s" ) on a server ( "localhost" ) with a specified community (in this case, "public" ) to a certain value (in this case, "sterling@ _designmultimedia.com" ). Because the snmpset() function returns true on success and false on failure, we can then check the return value with the die() function. The snmpset() function has two optional arguments: the timeout argument and the retry argument. Their meanings are the same as for the snmpwalk () function. |