• Welcome to RadioDJ - Free Radio Automation Software Forum. Please log in or sign up.

Zeno Media Shoutcast

Started by djstudio, July 15, 2020, 02:21:44 AM

djstudio

Hi all !! I bring you a question, I am trying to extract the information of the song that is playing from the Shoutcast server of Zeno Media. Until today I have not been able to complete my objective. I have the xml code, I need your help. Now my question is if the xml code is correct for its operation or if the Zeno Media server/IP is restricted and has a high level of security. or both theories mentioned above are wrong. in the code, replace the url and port of my stream and it still did nothing. and as I said before until today I could not achieve my goal. I await your responses.  :)

I leave the code:
<?php
$url 
"http://<MYSHOUTCASTURL>:<PORTNUMBER>/stats";
$ch curl_init();
curl_setopt($chCURLOPT_RETURNTRANSFER1);
curl_setopt($chCURLOPT_URL$url);

$data curl_exec($ch);
curl_close($ch);

$xml simplexml_load_string($data);

$servname $xml->SERVERTITLE;
$song $xml->SONGTITLE;
$status $xml->STREAMSTATUS;

if(
$status == '0'){
$stat '

<div style="padding:8px;background-color:#1c1c1c;border-radius:10px 10px 10px 10px;border:#080808 solid 1px;color:#ffffff;font-family:Comic Sans MS, cursive;">
SORRY! We are not broadcasting at the moment...
<div style="padding:8px;background-color:#000000;border:#080808 solid 1px;margin-top:6px;border-radius:10px 10px 10px 10px;">
Please come back soon
</div><br/>
See you soon ;)
</div>

'
;
}elseif(
$status == '1'){
$stat '

<div style="padding:8px;background-color:#1c1c1c;border-radius:10px 10px 10px 10px;border:#080808 solid 1px;color:#ffffff;font-family:Comic Sans MS, cursive;">
BROADCASTING LIVE with : '
.$servname.'
<div style="padding:8px;background-color:#000000;border:#080808 solid 1px;margin-top:6px;border-radius:10px 10px 10px 10px;">
Now playing: '
.$song.'

'
;
}
echo 
$stat;
?>


EmmaS

Quote from: djstudio on July 15, 2020, 02:21:44 AM
<?php
$url 
"http://<MYSHOUTCASTURL>:<PORTNUMBER>/stats";
$ch curl_init();
curl_setopt($chCURLOPT_RETURNTRANSFER1);
curl_setopt($chCURLOPT_URL$url);

$data curl_exec($ch);
curl_close($ch);

$xml simplexml_load_string($data);

$servname $xml->SERVERTITLE;
$song $xml->SONGTITLE;
$status $xml->STREAMSTATUS;

if(
$status == '0'){
$stat '

<div style="padding:8px;background-color:#1c1c1c;border-radius:10px 10px 10px 10px;border:#080808 solid 1px;color:#ffffff;font-family:Comic Sans MS, cursive;">
SORRY! We are not broadcasting at the moment...
<div style="padding:8px;background-color:#000000;border:#080808 solid 1px;margin-top:6px;border-radius:10px 10px 10px 10px;">
Please come back soon
</div><br/>
See you soon ;)
</div>

'
;
}elseif(
$status == '1'){
$stat '

<div style="padding:8px;background-color:#1c1c1c;border-radius:10px 10px 10px 10px;border:#080808 solid 1px;color:#ffffff;font-family:Comic Sans MS, cursive;">
BROADCASTING LIVE with : '
.$servname.'
<div style="padding:8px;background-color:#000000;border:#080808 solid 1px;margin-top:6px;border-radius:10px 10px 10px 10px;">
Now playing: '
.$song.'

'
;
}
echo 
$stat;
?>




I've put my IP and PORT into this to check and all is working fine so I can only assume it's something to do with ZENO...
This is ShoutcastXML V1.0 found at:
https://www.stewartswebworks.com/scripts.php
XperienceRewind.co.uk - 70s and 80s None Stop
https://www.xperiencerewind.co.uk/

XperienceRadio.co.uk - Club Dance & Trance
https://www.xperienceradio.co.uk/

DJ Garybaldy

I don't think its possible to extract the now playing information from Zeno as its hard coded with their servers. The songs titles only populate on Zeno when there are listeners connected if you don't have listeners it won't display the now playing info.


You'd be better off running another Shoutcast server and extracting the now playing information from that.
Worlds Biggest Fan of RadioDJ EVER

RadioDJ is my most FAVOURITE piece of software

https://djgarybaldy.blogspot.com/search?q=radiodj

Install RadioDJ: https://djgarybaldy.blogspot.com/2020/08/how-to-install-radiodj-free-radio.html

RadioDJ 2.0.3.9 - MariaDB 10.8 - Windows 10

andrei1412

Quote from: DJ Garybaldy on July 16, 2020, 11:47:03 AM
I don't think its possible to extract the now playing information from Zeno as its hard coded with their servers. The songs titles only populate on Zeno when there are listeners connected if you don't have listeners it won't display the now playing info.


You'd be better off running another Shoutcast server and extracting the now playing information from that.

Lol that's how I did things when i used Zeno as main server. But now I'm using Azuracast on my local server which is superior to Zeno media  8)

djstudio

Quote from: andrei1412 on July 16, 2020, 12:24:19 PM
Lol that's how I did things when i used Zeno as main server. But now I'm using Azuracast on my local server which is superior to Zeno media  8)

So I will try to use AzuraCast to extract the shoutcast information of the currently playing song. I was seeing that to use the AzuraCast platform you need to have a virtual machine (VPS). What service / website do you recommend to start?