Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

anleitungen:software:azuracast:json [2024/01/09 22:25] – angelegt mikeanleitungen:software:azuracast:json [Unbekanntes Datum] (aktuell) – Externe Bearbeitung (Unbekanntes Datum) 127.0.0.1
Zeile 1: Zeile 1:
 +====== AzuraCast - JSON ======
  
 +===== Song History =====
 +
 +For Wordpress Integration with the JSON Content Importer Plugin:
 +
 +<code>
 +[jsoncontentimporter url="http://your-stream-url/api/nowplaying/1.json"]
 +{subloop-array:song_history:-1}
 +{subloop:song_history.song:-1}
 +<div>{song_history.song.text}</div>
 +{/subloop:song_history.song}
 +{/subloop-array:song_history}
 +[/jsoncontentimporter]
 +</code>
 +
 +===== Now playing =====
 +
 +<code>
 +<?php
 +$json = file_get_contents('http://stream-url/api/nowplaying/1');
 +$obj = json_decode($json, true);
 +$nowplaying = $obj["now_playing"]["song"]["artist"] . " - " . $obj["now_playing"]["song"]["title"];
 +echo $nowplaying;
 +?>
 +</code>
Navigation

Alternative Startseite
Helpdesk
Links
Maps
Radio
Suchmaschine


Drucken/exportieren