snmp_set_quick_print
snmp_set_quick_print
Set the value of enable within the NET-SNMP library
true **snmp_set_quick_print** bool $enable
Sets the value of within the NET- library. When this
is set (1), the library will return 'quick printed' values. This
means that just the value will be printed. When is not
enabled (default) the NET- library prints extra information
including the type of the value (i.e. IpAddress or OID). Additionally,
if quick_print is not enabled, the library prints additional hex values
for all strings of three characters or less.
enable``enable
By default the NET- library returns verbose values, quick_print is used to return only the value.
Currently strings are still returned with extra quotes, this will be corrected in a later release.
enable
return.true.always
Setting quick_print is often used when using the information returned rather than displaying it.
**Voorbeeld: Using **
<?php
snmp_set_quick_print(0);
$a = snmpget("127.0.0.1", "public", ".1.3.6.1.2.1.2.2.1.9.1");
echo "$a\n";
snmp_set_quick_print(1);
$a = snmpget("127.0.0.1", "public", ".1.3.6.1.2.1.2.2.1.9.1");
echo "$a\n";
?>
'Timeticks: (0) 0:00:00.00'
'0:00:00.00'
snmp_get_quick_print