<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML ><HEAD ><TITLE >snmp_set_quick_print</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="Manual PHP" HREF="index.html"><LINK REL="UP" TITLE="SNMP Functions" HREF="ref.snmp.html"><LINK REL="PREVIOUS" TITLE="snmp_set_oid_numeric_print" HREF="function.snmp-set-oid-numeric-print.html"><LINK REL="NEXT" TITLE="snmp_set_valueretrieval" HREF="function.snmp-set-valueretrieval.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=ISO-8859-2"></HEAD ><BODY CLASS="refentry" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >Manual PHP</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.snmp-set-oid-numeric-print.html" ACCESSKEY="P" >Înapoi</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.snmp-set-valueretrieval.html" ACCESSKEY="N" >Înainte</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="function.snmp-set-quick-print" ></A >snmp_set_quick_print</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN107720" ></A ><P > (PHP 3>= 3.0.8, PHP 4 , PHP 5)</P >snmp_set_quick_print -- Set the value of quick_print within the UCD SNMP library </DIV ><DIV CLASS="refsect1" ><A NAME="AEN107723" ></A ><H2 >Description</H2 >void <B CLASS="methodname" >snmp_set_quick_print</B > ( bool quick_print)<BR ></BR ><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 ><A NAME="AEN107733" ></A ><TABLE BORDER="0" BGCOLOR="#E0E0E0" CELLPADDING="5" ><TR ><TD ><code><font color="#000000"> <font color="#0000BB"><?php<br />snmp_set_quick_print</font><font color="#007700">(</font><font color="#0000BB">0</font><font color="#007700">);<br /></font><font color="#0000BB">$a </font><font color="#007700">= </font><font color="#0000BB">snmpget</font><font color="#007700">(</font><font color="#DD0000">"127.0.0.1"</font><font color="#007700">, </font><font color="#DD0000">"public"</font><font color="#007700">, </font><font color="#DD0000">".1.3.6.1.2.1.2.2.1.9.1"</font><font color="#007700">);<br />echo </font><font color="#DD0000">"$a< br /></font><font color="#007700">\n</font><font color="#DD0000">"</font><font color="#007700">;<br /></font><font color="#0000BB">snmp_set_quick_print</font><font color="#007700">(</font><font color="#0000BB">1</font><font color="#007700">);<br /></font><font color="#0000BB">$a </font><font color="#007700">= </font><font color="#0000BB">snmpget</font><font color="#007700">(</font><font color="#DD0000">"127.0.0.1"</font><font color="#007700">, </font><font color="#DD0000">"public"</font><font color="#007700">, </font><font color="#DD0000">".1.3.6.1.2.1.2.2.1.9.1"</font><font color="#007700">);<br />echo </font><font color="#DD0000">"$a<br /></font><font color="#007700">\n</font><font color="#DD0000">"</font><font color="#007700">;<br /></font><font color="#0000BB">?></font> </font> </code></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 SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="function.snmp-set-oid-numeric-print.html" ACCESSKEY="P" >Înapoi</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Acasã</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.snmp-set-valueretrieval.html" ACCESSKEY="N" >Înainte</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >snmp_set_oid_numeric_print</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="ref.snmp.html" ACCESSKEY="U" >Sus</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >snmp_set_valueretrieval</TD ></TR ></TABLE ></DIV ></BODY ></HTML >