how to edit shell_exec output
Posted: Wed Jun 29, 2005 9:57 am
hi
thanks for looking info this request, when i run this script
<?php $output = shell_exec('/usr/local/xpgk/bin/mp_shell.sh sh st 2>&1');
echo "<pre>$output</pre>"; ?>
i get this result
Mera VoIP Transit Softswitch ( 300 Advanced )
Release 2.1.8(Jun 23 2004 19:05:51)
---------------------- Common statistics ----------------------
Host : 205.150.74.182
Start time : 27/06/2005 17:53:58
Up time : 1 days 16 hours 45 minutes
Stat start time : 27/06/2005 17:53:58
Stat duration : 1 days 16 hours 45 minutes
Max load : 2 calls
Calls duration : 0 minute(s)
Active calls : 0
Active AVG 5 min : 0
Received calls : 33
Normal calls : 24
Failed calls : 9
Rejected calls : 0
Received Kb : 1750
Written Kb : 1739
wanted to know edit this and catch in for later use in tables>> here is added code i used but did not work
while(list($number,$value) = each($output)){
list($starttime,$maxload,$activecalls,$rejeted,)=split(', ',$value);
thanks for looking info this request, when i run this script
<?php $output = shell_exec('/usr/local/xpgk/bin/mp_shell.sh sh st 2>&1');
echo "<pre>$output</pre>"; ?>
i get this result
Mera VoIP Transit Softswitch ( 300 Advanced )
Release 2.1.8(Jun 23 2004 19:05:51)
---------------------- Common statistics ----------------------
Host : 205.150.74.182
Start time : 27/06/2005 17:53:58
Up time : 1 days 16 hours 45 minutes
Stat start time : 27/06/2005 17:53:58
Stat duration : 1 days 16 hours 45 minutes
Max load : 2 calls
Calls duration : 0 minute(s)
Active calls : 0
Active AVG 5 min : 0
Received calls : 33
Normal calls : 24
Failed calls : 9
Rejected calls : 0
Received Kb : 1750
Written Kb : 1739
wanted to know edit this and catch in for later use in tables>> here is added code i used but did not work
while(list($number,$value) = each($output)){
list($starttime,$maxload,$activecalls,$rejeted,)=split(', ',$value);