downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  

<snmp_set_oid_output_formatsnmp_set_valueretrieval>
Last updated: Thu, 26 Jun 2008

snmp_set_quick_print

(PHP 4, PHP 5)

snmp_set_quick_print — Set the value of quick_print within the UCD SNMP library

Description

void snmp_set_quick_print ( bool $quick_print )

Sets the value of quick_print within the UCD SNMP library. When this is set (1), the SNMP library will return 'quick printed' values. This means that just the value will be printed. When quick_print is not enabled (default) the UCD SNMP 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.

By default the UCD SNMP 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.

Parameters

quick_print

Return Values

No value is returned.

Examples

Setting quick_print is often used when using the information returned rather then displaying it.

Example #1 Using snmp_set_quick_print()

<?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";
?>

The above example will output something similar to:

'Timeticks: (0) 0:00:00.00'
'0:00:00.00'



add a noteadd a note User Contributed Notes
Set the value of quick_print within the UCD SNMP library
There are no user contributed notes for this page.




<snmp_set_oid_output_formatsnmp_set_valueretrieval>
Last updated: Thu, 26 Jun 2008
show source | credits | sitemap | contact | advertising | mirror sites
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://phpbuilder.com/
Last updated: Tue Nov 1 20:20:59 2005 EST
Columns / Articles | Tips / Quickies | News | News Linking and RSS Feeds | Shared Code Library
Mail Archives | Support / Discussion Forums | Get Started! Links | Contribute! | Docs