Here's an example with vanilla JS (attached). I had a test file lying around
and swapped your info in. You can change setInterval() to fetch as often as you
like (1000 = 1 second).
Ben Weddle
-----Original Message-----
From: Icecast <icecast-bounces at xiph.org> On Behalf Of Railgun
Sent: Wednesday, November 22, 2023 5:49 PM
To: icecast at xiph.org
Subject: Re: [Icecast] mediaplayer for icecast streams?
Attention: This email originated from a source external to Metro Government.
Please exercise caution when opening any attachments or links from external
sources.
you can pull it with jQuery via javascript for example evry 10 seconds, and
update the informations you want, at least its the way i do it.
Am 23.11.2023 um 00:13 schrieb Thomas Jensen:
> Thank you, Ben!
>
> I was afraid it would be very complicated to get the information
> extracted, but it was very simple. My only problem now is to find a
> way to update the text on the webpage. I was hoping sleep(5) could do
> the trick, but it does not work.
>
> <?php
> if (1) {
>
$jsonobj=file("http://radio.protestbandet.dk:8000/status-json.xsl");
> //var_dump($jsonobj);
> $arr1[]=json_decode($jsonobj[0], true);
> echo
'<strong>'.$arr1[0]['icestats']['source']['title'].'</strong>';
> sleep(5);
> }
> ?>
>
> Can anyone help?
>
>
> Thanks
>
>
_______________________________________________
Icecast mailing list
Icecast at xiph.org
http://lists.xiph.org/mailman/listinfo/icecast
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.xiph.org/pipermail/icecast/attachments/20231123/2211c96c/attachment.html>