Hello,
ich have read many tutorials but my brain has paket loss
I will use API for my dashing board (TV) but is not working for me
here my php code
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://blub.de/includes/api.php');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,
http_build_query(
array(
'action' => 'GetTicketCounts',
// See https://developers.whmcs.com/api/authentication
'username' => 'xxxxxmycode',
'password' => mycode',
'ignoreDepartmentAssignments' => false,
'includeCountsByStatus' => true,
'responsetype' => 'json',
)
)
);
$response = curl_exec($ch);
if (curl_error($ch)) {
die('Unable to connect: ' . curl_errno($ch) . ' - ' . curl_error($ch));
}
curl_close($ch);
// Decode response
$jsonData = json_decode($response, true);
// Dump array structure for inspection
var_dump($jsonData);
-------
output
in browser
{"result":"success","filteredDepartments":[1,2,3,4,5,6,7],"allActive":20"awaitingReply":10,"flaggedTickets":0,"status":{"open":{"title":"Open","count":4},"answered":{"title":"Answered","count":95},"customerreply":{"title":"Customer-Reply","count":6},"closed":{"title":"Closed","count":512},"onhold":{"title":"On Hold","count":0},"inprogress":{"title":"In Progress","count":0}}}int(1)
how can dump/parse for example only awaitingReply i need only one output.