ОсновноеRadiotalkПользовательское
MyRadio24 - Хостинг для создания интернет радио
70   •   Посмотреть все темы

Loop though radio song history

 

4
Jérémie @91828
Hi,

I created a radio on myradio24 and I'm looking for a way to loop through the songs history using PHP to be able to separate the Now playing song from the history.

Radio24 provides a script that calls %song% to get the songs one by one but I can't manage to get the whole list in one variable.

Any ideas welcome.

Thank you.

20089
Dimitry @Dimitry
Hi
See this PHP example code at end of this page:
https://myradio24.com/?to=set&port=8000

Use this code for your radio with our cache function.
You have all data in JSON format and you can loop through the songs history or get current song directly.

4
Jérémie @91828
Great thank you ! I found the php pretty useful. But the song history does not seem to update after each song like it does with the .js script version ?

20089
Dimitry @Dimitry
Yes. PHP is serverside. And you need to update on Browserside with JS.
You can use JS to loop through the songs at the same way...
What will you target with this?

4
Jérémie @91828
Oh yes of course !
I found what I needed thank you for your time 😀