// this is an example php code to call the json api.
// available data output
// now playing song title
// now playing song album image url (high quality)
// online listeners
// unique listeners
// bitrate
// dj username if there is a dj live streaming
// dj profile picture if there is a dj live streaming
// last played 5 songs
$url = "https://radio.cimaspeed.com/cp/get_info.php?p=8094";
$ch = curl_init();
curl_setopt($ch, curlopt_post, 0);
curl_setopt($ch, curlopt_returntransfer, 1);
curl_setopt($ch, curlopt_timeout, 15);
curl_setopt($ch, curlopt_ssl_verifyhost, 0);
curl_setopt($ch, curlopt_ssl_verifypeer, 0);
curl_setopt($ch, curlopt_url, $url);
curl_setopt($ch, curlopt_followlocation, true);
$return_json = curl_exec($ch);
$obj = json_decode($return_json);
$nowplaying = $obj->{'title'};
$image = $obj->{'art'};
$unique_listeners = $obj->{'ulistener'};
$online_listeners = $obj->{'listeners'};
$bitrate = $obj->{'bitrate'};
$djusername = $obj->{'djusername'};
$djprofile = $obj->{'djprofile'};
$played_last20 = $obj->{'history'};
foreach($played_last20 as $tracks)
{
echo $tracks; // Prints played last 20 tracks.
}
echo "
Now Playing: $nowplaying
"; echo "
";?
>
Now Playing: $nowplaying
"; echo "
Now Playing:







