Need Some PHP/AMI Guidance Please
Hello all,
I’ve got some PHP code that opens an AMI socket and does a ConfBridgeList for a specific bridge (8888).
This all works just fine but I need to filter the information displayed to only CallerIDName so I can see a complete list of names of participants.
After days of googling and playing with it, I’m no closer than I was when I
started.
I’m not at all married to a table. A simple list of names is fine…
Any help is much appreciated!
Pertinent code:
\n”;
} else {
fwrite($ami, “Action: Login\r\nUsername: someuser\r\nSecret:
somesecret\r\nEvents: off\r\n\r\n”);
fwrite($ami, “Action: ConfbridgeList\r\nConference: 8888\r\n\r\n”);
sleep(1);
$record = fread($ami,1024);
$record = explode(“\r\n”, $record);
echo ““;
echo “
“;
fclose($ami);
}
function php_table($value){
$row1 = true;
$value = explode(” “, $value);
foreach($value as $field){
if($row1){
echo “
“;
$row1 = false;
}
else{
echo “
“;
$row1 = true;
}
}
}
?>
I think the “explode” is where I should be looking but I’m very new to PHP
Thank you!
Pat…