<HTML ><HEAD ><TITLE >snmp_set_quick_print</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.44"><LINK REL="HOME" TITLE="PHP Manual" HREF="manual.html"><LINK REL="UP" TITLE="SNMP functions" HREF="ref.snmp.html"><LINK REL="PREVIOUS" TITLE="snmp_get_quick_print" HREF="function.snmp-get-quick-print.html"><LINK REL="NEXT" TITLE="String functions" HREF="ref.strings.html"></HEAD ><BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >PHP Manual</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.snmp-get-quick-print.html" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="ref.strings.html" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="function.snmp-set-quick-print" >snmp_set_quick_print</A ></H1 ><DIV CLASS="refnamediv" ><A NAME="AEN25442" ></A >snmp_set_quick_print -- Set the value of quick_print within the UCD SNMP library. </DIV ><DIV CLASS="refsect1" ><A NAME="AEN25445" ></A ><H2 >Description</H2 ><DIV CLASS="funcsynopsis" ><P ></P ><CODE CLASS="FUNCDEF" >void snmp_set_quick_print</CODE >(boolean quick_print);<P ></P ></DIV ><P > 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.</P ><P > Setting quick_print is often used when using the information returned rather then displaying it. <DIV CLASS="informalexample" ><P ></P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><PRE CLASS="programlisting" > 1 2 snmp_set_quick_print(0); 3 $a = snmpget("127.0.0.1", "public", ".1.3.6.1.2.1.2.2.1.9.1"); 4 echo "$a<BR>\n"; 5 snmp_set_quick_print(1); 6 $a = snmpget("127.0.0.1", "public", ".1.3.6.1.2.1.2.2.1.9.1"); 7 echo "$a<BR>\n"; 8 </PRE ></TD ></TR ></TABLE ><P ></P ></DIV ></P ><P > The first value printed might be: 'Timeticks: (0) 0:00:00.00', whereas with quick_print enabled, just '0:00:00.00' would be printed.</P ><P > By default the UCD SNMP library returns verbose values, quick_print is used to return only the value.</P ><P > Currently strings are still returned with extra quotes, this will be corrected in a later release.</P ><P > <B CLASS="function" >snmp_set_quick_print()</B > is only available when using the UCD SNMP library. This function is not available when using the Windows SNMP library.</P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="function.snmp-get-quick-print.html" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="manual.html" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="ref.strings.html" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >snmp_get_quick_print</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="ref.snmp.html" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >String functions</TD ></TR ></TABLE ></DIV ></BODY ></HTML >