RE: [PHP] System Command and snmp commands

From: Date: Tue, 26 Oct 2004 13:27:29 +0000
Subject: RE: [PHP] System Command and snmp commands
Groups: php.general 
Request: Send a blank email to php-general+get-200346@lists.php.net to get a copy of this message
Tring Tring ..... Just to ring please help me. I am giving to out print_r($ret) then it returns 1 at exec(' snmpget -v 2c -c public 10.103.16.14 sysUpTime.0',$ret); --Nikhil -----Original Message----- From: Mulley, Nikhil [mailto:mnikhil@corp.untd.com] Sent: Tuesday, October 26, 2004 12:41 PM To: php-general@lists.php.net Subject: [PHP] System Command and snmp commands Hi All, I want to use system command to perform snmp queries on a remote machine and the problem is that I want to store the output /result in an Array , so that I can later use it for parsing purposes.I know I could use exec and passthru statements actually,But I am unable to store the result in the array or I am unsure whether the result is not getting stored in the array Here is the code <?php exec(' snmpget -v 2c -c public 10.103.16.14 sysUpTime.0',$ret); list($a)=split('[,]',$ret); echo $a[0]; ?> Point me , if any thing wrong in the code Please help me. Thanks, Nikhil.

« previous php.general (#200346) next »