Update the CDR details

This commit is contained in:
Mark Crane 2014-06-14 08:00:10 +00:00
parent e3fcc4a9a4
commit ace39f7efc
1 changed files with 7 additions and 3 deletions

View File

@ -84,10 +84,10 @@ else {
//parse the xml to get the call detail record info //parse the xml to get the call detail record info
try { try {
if ($format == 'json') { if ($format == 'json') {
$xml = json_decode($json_string); $array = json_decode($json_string,true);
} }
if ($format == 'json') { if ($format == 'xml') {
$xml = simplexml_load_string($xml_string); $array = json_decode(json_encode((array)simplexml_load_string($xml_string)),true);
} }
} }
catch(Exception $e) { catch(Exception $e) {
@ -97,6 +97,10 @@ else {
//get the header //get the header
require_once "resources/header.php"; require_once "resources/header.php";
print_r($array);
exit;
//page title and description //page title and description
echo "<br>"; echo "<br>";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n"; echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";