The Server Pages
:: TSP Menu
- Home
- Authors
- Glossary
- RSS Feed

:: Servers
- CPanel
- Hosting
- Linux
- Windows

:: Webmaster
- Databases
- Design
- PHP
- Search Engines

:: Scripts
- Scripts

:: Documentation
- PHP Manual

:: Other
- Errors & Solutions
- TechPunt
- Wojjie

search for in the

snmp_get_valueretrieval> <SNMP Functions
[edit] Last updated: Sat, 12 May 2012

view this page in

snmp_get_quick_print

(PHP 4, PHP 5)

snmp_get_quick_print Fetches the current value of the UCD library's quick_print setting

Description

bool snmp_get_quick_print ( void )

Returns the current value stored in the UCD Library for quick_print. quick_print is off by default.

Return Values

Returns TRUE if quick_print is on, FALSE otherwise.

Examples

Example #1 snmp_get_quick_print() example

<?php
$quickprint 
snmp_get_quick_print();
?>

See Also

  • snmp_set_quick_print() - Set the value of quick_print within the UCD SNMP library for a full description of what quick_print does.



add a note add a note User Contributed Notes snmp_get_quick_print
antic 22-Feb-2003 11:13
This can be used to parse the returned values depending on the quick print setting. For example sysUpTime might look something like this: "Timeticks: (34575334) 4 days, 0:02:33.34", but if quick print is enabled it will be on the form: "4:0:2:33.34". To get the same output you can parse it differently, something like:

if(@ $sysUpTime = snmpget($switch,$community,"system.sysUpTime.0")){
    if(snmp_get_quick_print()){
       sscanf($sysUpTime, "%d:%d:%d:%d.%d",$day,$hour,$minute,$sec,$ticks);
        $sysUpTime = "$day days, $hour:$minute:$sec.$ticks";
    }else{
       $sysUpTime = ereg_replace("Timeticks: \([0-9]+\) ","",$sysUpTime);
   }
}

 
show source | credits | sitemap | contact | advertising | mirror sites