I'm developing a player for a radio. The radio and player is hosted on one server and streamed on another. I want to get the album cover and the song playing from the streaming server. I have used this code, however it only runs on the radio server:
<script type="text/javascript">
function get_host() {
var url = location.href;
url = url.split("/");
return url[2];
}
// Atualizar informações do streaming
musica_atual_players(9486,'musica_atual','60');
setInterval("musica_atual_players(9486,'musica_atual','60')",60000);
</script>
How do I make the function work with the URL of the streaming server?