哪里可以获得php的SNMP类

时间:2013-04-06 07:36:46

标签: php snmp net-snmp

我找到了http://www.php.net/manual/en/class.snmp.php,但找不到下载此脚本的链接。我试图在WEB中搜索,但结果相同。

或者是使用php扩展的任何方法来进行一个会话并使用它吗?

2 个答案:

答案 0 :(得分:1)

它在tarball中。您可以从official website

下载

看看它:

$ tar jtf php-5.4.13.tar.bz2 | grep snmp
php-5.4.13/ext/snmp/
php-5.4.13/ext/snmp/config.m4
php-5.4.13/ext/snmp/config.w32
php-5.4.13/ext/snmp/CREDITS
php-5.4.13/ext/snmp/php_snmp.h
php-5.4.13/ext/snmp/snmp.c
php-5.4.13/ext/snmp/snmp.dsp
php-5.4.13/ext/snmp/tests/
php-5.4.13/ext/snmp/tests/bug60749.phpt
php-5.4.13/ext/snmp/tests/bug64124.phpt
php-5.4.13/ext/snmp/tests/clean.inc
php-5.4.13/ext/snmp/tests/generic_timeout_error.phpt
php-5.4.13/ext/snmp/tests/ipv6.phpt
php-5.4.13/ext/snmp/tests/README
php-5.4.13/ext/snmp/tests/skipif.inc
php-5.4.13/ext/snmp/tests/snmp-object-errno-errstr.phpt
php-5.4.13/ext/snmp/tests/snmp-object-error.phpt
php-5.4.13/ext/snmp/tests/snmp-object-properties.phpt
php-5.4.13/ext/snmp/tests/snmp-object-setSecurity_error.phpt
php-5.4.13/ext/snmp/tests/snmp-object.phpt
php-5.4.13/ext/snmp/tests/snmp2_get.phpt
php-5.4.13/ext/snmp/tests/snmp2_getnext.phpt
php-5.4.13/ext/snmp/tests/snmp2_real_walk.phpt
php-5.4.13/ext/snmp/tests/snmp2_set-nomib.phpt
php-5.4.13/ext/snmp/tests/snmp2_set.phpt
php-5.4.13/ext/snmp/tests/snmp2_walk.phpt
php-5.4.13/ext/snmp/tests/snmp3-error.phpt
php-5.4.13/ext/snmp/tests/snmp3.phpt
php-5.4.13/ext/snmp/tests/snmp_get_quick_print.phpt
php-5.4.13/ext/snmp/tests/snmp_get_valueretrieval.phpt
php-5.4.13/ext/snmp/tests/snmp_getvalue.phpt
php-5.4.13/ext/snmp/tests/snmp_include.inc
php-5.4.13/ext/snmp/tests/snmp_read_mib.phpt
php-5.4.13/ext/snmp/tests/snmp_set_enum_print.phpt
php-5.4.13/ext/snmp/tests/snmp_set_oid_output_format.phpt
php-5.4.13/ext/snmp/tests/snmpd.conf
php-5.4.13/ext/snmp/tests/snmpget.phpt
php-5.4.13/ext/snmp/tests/snmpgetnext.phpt
php-5.4.13/ext/snmp/tests/snmprealwalk.phpt
php-5.4.13/ext/snmp/tests/snmpset-nomib.phpt
php-5.4.13/ext/snmp/tests/snmpset.phpt
php-5.4.13/ext/snmp/tests/snmpwalk.phpt
php-5.4.13/ext/snmp/tests/wrong_hostname.phpt

答案 1 :(得分:0)

“SNMP”类(在PHP 5.4中引入)是不是“脚本”;相反,它是一个扩展,可以编译成 PHP,也可以作为可以启用或禁用的模块提供。我怀疑(1)您使用的是旧版本的PHP,或者(2)您没有安装或启用SNMP扩展。