Use JavaScript to run external server application


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


How do I make the function work with the URL of the streaming server?

asked by anonymous 08.11.2018 / 13:02

0 answers