<?php $accountId = 3855;
$agentId = "AG1";
$user = "FranDuque";
$password = "091082";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://panel.masvoz.es/rs/supervisor/agent/3855/AG1");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_USERPWD, "$user:$password");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Accept: application/json"));
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$jsonString = curl_exec($ch);
$agent = json_decode($jsonString);
echo "$agent->name está $FranDuque->status" . PHP_EOL;?>
me sale en la web esto:
name está $FranDuque->status" . PHP_EOL;?>
Por lo tanto está mal y no sé donde está