17 lines
690 B
PHP
17 lines
690 B
PHP
|
<?php
|
||
|
|
||
|
$icecastJson = file_get_contents('http://pl4tform.org:8000/status-json.xsl');
|
||
|
#echo "JSON?: $json";
|
||
|
$icecastJson = json_decode($icecastJson, true);
|
||
|
// echo $yummy;
|
||
|
$title = $icecastJson['icestats']['source']['title'];
|
||
|
// $title = str_replace("/var/www/nextcloud/data/radio_admin/files/radio_music_and_jingles/", "", $title);
|
||
|
// $title = str_replace(".mp3", "", $title);
|
||
|
$title = explode('/', $title);
|
||
|
$title = end($title);
|
||
|
$title = str_replace(".mp3", "", $title);
|
||
|
$title = str_replace("_(youconvert.net)", "", $title);
|
||
|
$nowLive = "<div id='nowLiveDiv' onclick='audioPlay(\"https://pl4tform.org/stream\")'><span id='nowLiveSpan'>Now live:</span> $title</div>";
|
||
|
|
||
|
echo "$nowLive";
|
||
|
?>
|