update : 2015.11.03
php.shukuma.com검색:
|
SNMP::get(PHP 5 >= 5.4.0) SNMP::get — Fetch an SNMP object 설명
Fetch an SNMP object specified in
인수
If
반환값
Returns SNMP objects requested as string or array
depending on 오류/예외
This method does not throw any exceptions by default.
To enable throwing an SNMPException exception when some of library errors occur
the SNMP class parameter 예제Example #1 Single SNMP object Single SNMP object may be requested in two ways: as string resulting string return value or as single-element array with associative array as output.
<?php 위 예제의 출력 예시: STRING: Test server Array ( [SNMPv2-MIB::sysDescr.0] => STRING: Test server ) Example #2 Miltiple SNMP objects
$session = new SNMP(SNMP::VERSION_1, "127.0.0.1", "public"); 위 예제의 출력 예시: Array ( [SNMPv2-MIB::sysDescr.0] => STRING: Test server [SNMPv2-MIB::sysName.0] => STRING: myhost.nodomain ) 참고
|