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:[EMAIL PROTECTED]
Sent: Tuesday, October 26, 2004 12:41 PM
To: [EMAIL PROTECTED]
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.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php