RE: System Command and snmp commands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx]
Sent: Tuesday, October 26, 2004 12:41 PM
To: php-general@xxxxxxxxxxxxx
Subject:  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



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux