I am using
<?php
$url1=$_SERVER['REQUEST_URI'];
header("Refresh: 15; URL=$url1");
$apiSecret = "My API Key Here"; // your API secret from (Tools -> API Keys) page
//$limit = "50"; // limited entries data per page &limit={$limit}
//$page = "1"; // limited entries data per page
$cURL = curl_init();
curl_setopt($cURL, CURLOPT_URL, "https://sms.uncgateway.com/api/get/wa.servers?secret={$apiSecret}");
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($cURL);
curl_close($cURL);
$result1 = json_decode($response, true);
// do something with response
print_r($result1);
And getting result
Array ( [status] => 200 [message] => WhatsApp Servers [data] => Array ( [0] => Array ( [id] => 1 [name] => Windows Server [status] => online [available] => 1 ) ) )
so how to get the only [status => Online and {available} => 1]
print_r($result1=>arry(arry(arry([$status],[$available]))));
and getting error
New contributor
Murad Ali is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
6