Page 1 of 1
Polling Cisco Router with PHP
Posted: Wed Feb 02, 2005 3:07 pm
by xt07t
I want to accomplish something simple, but I'm having trouble getting it to work. I want to poll a router for all of its interfaces and their descriptions. Then list these on a web page. I'm not sure how to go about doing this, so any help would be greatly appreciated. Thanks!
xtort
Posted: Wed Feb 02, 2005 8:56 pm
by timvw
meaby have a look at the
http://www.php.net/snmp functions??
i wouldn't know a more appropriate to talk with routers....
Posted: Thu Feb 03, 2005 8:30 am
by hedge
most routers have a mini-web server built into them, just use curl or a similar method to pull content from the router.
Posted: Sat Feb 05, 2005 12:38 pm
by xt07t
timvw wrote:meaby have a look at the
http://www.php.net/snmp functions??
i wouldn't know a more appropriate to talk with routers....
Thanks I will read this section carefully.
Posted: Tue Feb 22, 2005 2:51 pm
by xt07t
I am unable to use the snmpget functions, even though I added them during install. When I try I get the following error
Fatal error: Call to undefined function: snmpget() in /var/www/test1.php on line 19
I'm not sure if I installed PHP correctly, or even how to figure out if the snmp functions are included. I added phpinfo() to see what was in there.
Included in the configure command output section is
'--with-mysql=shared,/usr' '--with-pgsql=shared' '--with-snmp=shared,/usr' '--with-snmp=shared'
I thought this meant that I installed with the --with-snmp option.
xt07t wrote:timvw wrote:meaby have a look at the
http://www.php.net/snmp functions??
i wouldn't know a more appropriate to talk with routers....
Thanks I will read this section carefully.
Posted: Tue Feb 22, 2005 3:55 pm
by smpdawg
Does snmp show up when you do a phpinfo()?
Posted: Wed Feb 23, 2005 7:53 am
by xt07t
It doesn't show up as a heading, is that what you mean? Like MySQL or Calendar or ftp. Does that mean I nead to recompile it?
smpdawg wrote:Does snmp show up when you do a phpinfo()?
Posted: Wed Feb 23, 2005 12:38 pm
by feyd
that'd very likely mean it isn't enabled/installed/compiled-in
Posted: Thu Feb 24, 2005 10:15 am
by xt07t
I'm trying to ./configure a make file, but it keeps crashing out with...
checking lex output file root... ./configure: line 2420: lex: command not found
configure: error: cannot find output from lex; giving up
feyd wrote:that'd very likely mean it isn't enabled/installed/compiled-in
Posted: Thu Feb 24, 2005 11:24 am
by feyd
it appears you don't have lex installed..