snmpget() Trapping error on fail...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
bob_beauvais
Forum Newbie
Posts: 1
Joined: Fri May 14, 2004 10:59 am

snmpget() Trapping error on fail...

Post by bob_beauvais »

I am successfully using snmpget() to pull some information from my devices. When I have a device down my snmpget() function fails with a standard (very long) php error message. I would like to be able to test to see that the device is able to return snmp information before using snmpget() so that I can generate my own user-friendly error. According to the PHP manual snmpget() should return "false" on error. But I don't seem to be able to get arround the :arrow: Warning: snmpget(): No response... msg that appears.

Would appreciate any ideas on this...

Thanks a bunch,

Bob
magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

Post by magicrobotmonkey »

look up @ in the php manual
Post Reply