<?php

require_once ('stream_url.php') ;

function kradio_curl($site){ 
    $ch = curl_init(); 
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); 
    curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"); 
    curl_setopt($ch, CURLOPT_URL, $site); 
    ob_start();      
    return curl_exec($ch); 
    ob_end_clean();   
    curl_close ($ch); 
}  

$url = kradio_curl($k_radio_stream_url) ;

$explode_url = explode(",", $url);

$song = str_replace("</body></html>","",$explode_url[6]);
$song = iconv('ISO-8859-9','UTF-8', $song);

$array = ['song' => $song];

echo json_encode($array);

?>