mrdata71 Posted July 24, 2017 Author Share Posted July 24, 2017 I use the website builder. So is there any other alternatives to making this work? DJ Dataman at http://www.thepartyzoneradio.com Link to comment Share on other sites More sharing options...
James Posted July 24, 2017 Share Posted July 24, 2017 I use the website builder. So is there any other alternatives to making this work? Not that I can think of right now. I am currently building a paid service that forms a part of this but that is not ready yet. Studiio - All-In-One Radio Communication Platform SMS | Phone Calls | Social Media | Content Link to comment Share on other sites More sharing options...
PapaBearPW Posted July 27, 2017 Share Posted July 27, 2017 There might be a way using javascript to do something. But my javascript mojo is pretty weak so, I won't be much help with that. A service like James is talking about might be a better option for you. http://www.lunarcaster.com Link to comment Share on other sites More sharing options...
mrdata71 Posted July 30, 2017 Author Share Posted July 30, 2017 Not that I can think of right now. I am currently building a paid service that forms a part of this but that is not ready yet. Please let me know when this is ready. Even if I had a button on my website that would show the current DJ that is better than nothing. DJ Dataman at http://www.thepartyzoneradio.com Link to comment Share on other sites More sharing options...
mrdata71 Posted August 21, 2017 Author Share Posted August 21, 2017 I now have FTP access. Let me see what I can do. DJ Dataman at http://www.thepartyzoneradio.com Link to comment Share on other sites More sharing options...
djaubs89 Posted August 29, 2017 Share Posted August 29, 2017 im using that script <?php // First we need to make a connection to your Shoutcast server stats xml page. Change host and port of the url to yours and the sid number too if needed (default is 1). $url = "http://149.56.234.138:8157/stats?sid=1"; $xml = simplexml_load_file($url) or die("feed not loading"); // Use SERVERGENRE instead of SONGTITLE to parse DJ name from the Genre. // $genre = $xml->SERVERGENRE; // echo $genre; // Next we pull the SONGTITLE from the xml and split the variable with delimiter ":" $songTitle = $xml->SONGTITLE; $parts = explode(':', $songTitle); // $parts should now contain 2 strings of text in an array if a DJ is onair, and just one if not. // Use $parts[0] for prepended song titles and $parts[1] for appended song titles. // For prepended (DJ name before title info), DJs must prepend in the format of "DJname: " (without "s.) // For appended (DJ name after title info), DJs must append in the format of ":DJname" (without "s.) // The colon is important as it is what tells us where the DJ name ends and the Song Title begins. // Next we check if anything is in the second part of our array. if($parts[1] == ""){ // If there is nothing in the second part of the array, we know that the Auto DJ is on. echo "AutoDJ OnAir!"; // Instead of just saying AutoDJ OnAir, we can echo out an image based on one located in // a folder called djimages like this // echo "http://urban-radio.co.uk/images/jukebox.gifAuto DJ"; } else { // If $parts[1] does have text, our DJ is on. echo $parts[0]." OnAir"; // Instead of just saying DJ XYZ OnAir, we can echo out an image based on one located in // a folder called djimages where the image filename is the same as the djname used like this: // echo "djimages/".$parts[0].".jpgAuto DJ"; } ?> but my question is how am i suppose to know if one of my djs are on the air? Link to comment Share on other sites More sharing options...
mrdata71 Posted August 29, 2017 Author Share Posted August 29, 2017 ok so how do I use this php file to display it on my website? Yes i am still new to this and am in the process of rebuilding it using cpanel. Thanks in advance! DJ Dataman at http://www.thepartyzoneradio.com Link to comment Share on other sites More sharing options...
James Posted August 30, 2017 Share Posted August 30, 2017 I have a simplified PHP script in this post: http://forums.broadcastingworld.com/showthread.php/15461-on-air-script?p=96159post96159 Studiio - All-In-One Radio Communication Platform SMS | Phone Calls | Social Media | Content Link to comment Share on other sites More sharing options...
mrdata71 Posted August 30, 2017 Author Share Posted August 30, 2017 Awesome! I will let you know when i am able to test it and let you know the results. DJ Dataman at http://www.thepartyzoneradio.com Link to comment Share on other sites More sharing options...
ultra89 Posted November 5, 2017 Share Posted November 5, 2017 can someone show me an example page of this php code working please i have edited this code before posting // First we need to make a connection to your Shoutcast server stats xml page. Change host and port of the url to yours and the sid number too if needed (default is 1). $url = "http://virtual-nexus.de:8000/stats?sid=1"; $xml = simplexml_load_file($url) or die("feed not loading"); // Use SERVERGENRE instead of SONGTITLE to parse DJ name from the Genre. // $genre = $xml->SERVERGENRE; // echo $genre; // Next we pull the SONGTITLE from the xml and split the variable with delimiter ":" $songTitle = $xml->SONGTITLE; $parts = explode(':', $songTitle); // $parts should now contain 2 strings of text in an array if a DJ is onair, and just one if not. // Use $parts[0] for prepended song titles and $parts[1] for appended song titles. // For prepended (DJ name before title info), DJs must prepend in the format of "DJname: " (without "s.) // For appended (DJ name after title info), DJs must append in the format of ":DJname" (without "s.) // The colon is important as it is what tells us where the DJ name ends and the Song Title begins. // Next we check if anything is in the second part of our array. if($parts[1] == ""){ // If there is nothing in the second part of the array, we know that the Auto DJ is on. echo "AutoDJ OnAir!"; // Instead of just saying AutoDJ OnAir, we can echo out an image based on one located in // a folder called djimages like this // echo "djimages/jukebox.pngAuto DJ"; } else { // If $parts[1] does have text, our DJ is on. echo $parts[0]." OnAir"; // Instead of just saying DJ XYZ OnAir, we can echo out an image based on one located in // a folder called djimages where the image filename is the same as the djname used like this: // echo "djimages/jukebox.png".$parts[0].".jpgAuto DJ"; } ?> Link to comment Share on other sites More sharing options...
James Posted November 5, 2017 Share Posted November 5, 2017 can someone show me an example page of this php code working please i have edited this code before posting // First we need to make a connection to your Shoutcast server stats xml page. Change host and port of the url to yours and the sid number too if needed (default is 1). $url = "http://virtual-nexus.de:8000/stats?sid=1"; $xml = simplexml_load_file($url) or die("feed not loading"); // Use SERVERGENRE instead of SONGTITLE to parse DJ name from the Genre. // $genre = $xml->SERVERGENRE; // echo $genre; // Next we pull the SONGTITLE from the xml and split the variable with delimiter ":" $songTitle = $xml->SONGTITLE; $parts = explode(':', $songTitle); // $parts should now contain 2 strings of text in an array if a DJ is onair, and just one if not. // Use $parts[0] for prepended song titles and $parts[1] for appended song titles. // For prepended (DJ name before title info), DJs must prepend in the format of "DJname: " (without "s.) // For appended (DJ name after title info), DJs must append in the format of ":DJname" (without "s.) // The colon is important as it is what tells us where the DJ name ends and the Song Title begins. // Next we check if anything is in the second part of our array. if($parts[1] == ""){ // If there is nothing in the second part of the array, we know that the Auto DJ is on. echo "AutoDJ OnAir!"; // Instead of just saying AutoDJ OnAir, we can echo out an image based on one located in // a folder called djimages like this // echo "djimages/jukebox.pngAuto DJ"; } else { // If $parts[1] does have text, our DJ is on. echo $parts[0]." OnAir"; // Instead of just saying DJ XYZ OnAir, we can echo out an image based on one located in // a folder called djimages where the image filename is the same as the djname used like this: // echo "djimages/jukebox.png".$parts[0].".jpgAuto DJ"; } ?> That script assumes that you show the DJ name via your 'current playing song' input via your stream server. Running the script myself, all I get is "feed not loading", this is due to you having a SHOUTcast V1 server, whereas the '/stats?sid=X' parameter is exclusive to SHOUTcast V2. I would not be a fan of this script mainly due to the fact it uses the 'current playing song' output for a different purpose than intended. If you wanted to display what DJ is on air now, along with the current playing song, you would not be able to do so. Since you are on SHOUTcast V1, you will need a script that analyses the '/7.html' script. This uses a comma separated string rather than XML to pull the info. Studiio - All-In-One Radio Communication Platform SMS | Phone Calls | Social Media | Content Link to comment Share on other sites More sharing options...
PapaBearPW Posted November 6, 2017 Share Posted November 6, 2017 I would not be a fan of this script mainly due to the fact it uses the 'current playing song' output for a different purpose than intended. If you wanted to display what DJ is on air now, along with the current playing song, you would not be able to do so. Not exactly true James. That script assumes the song titles have been prepended or appended with the DJ names. Echoing out $parts[1] (assuming appended DJ name) will display the DJ name and echoing out $parts[0] will display the current playing song. http://www.lunarcaster.com Link to comment Share on other sites More sharing options...
airmedia Posted March 13, 2018 Share Posted March 13, 2018 I think what would be a good feature is for someone to screen shot the way to do it and put it on youtube. this could help out a lot of people. Air Media - Radio Production Company Radio Imaging Effects - News Beds - Traffic Imaging Voice Overs - Imaging Effects - Radio Sweepers Link to comment Share on other sites More sharing options...
ultra89 Posted March 27, 2018 Share Posted March 27, 2018 mrdata i have looked on you're website and you have a box that says requests offline? is there anyway i could a code that says that Link to comment Share on other sites More sharing options...
ultra89 Posted November 25, 2020 Share Posted November 25, 2020 sorry if old post but this script // Use SERVERGENRE instead of SONGTITLE to parse DJ name from the Genre.// $genre = $xml->SERVERGENRE;// echo $genre; // Next we pull the SONGTITLE from the xml and split the variable with delimiter ":" $songTitle = $xml->SONGTITLE;$parts = explode(':', $songTitle); // $parts should now contain 2 strings of text in an array if a DJ is onair, and just one if not.// Use $parts[0] for prepended song titles and $parts[1] for appended song titles.// For prepended (DJ name before title info), DJs must prepend in the format of "DJname: " (without "s.)// For appended (DJ name after title info), DJs must append in the format of ":DJname" (without "s.)// The colon is important as it is what tells us where the DJ name ends and the Song Title begins. // Next we check if anything is in the second part of our array.if($parts[1] == ""){ // If there is nothing in the second part of the array, we know that the Auto DJ is on.echo "AutoDJ OnAir!"; // Instead of just saying AutoDJ OnAir, we can echo out an image based on one located in // a folder called djimages like this// echo "djimages/jukebox.pngAuto DJ"; } else { // If $parts[1] does have text, our DJ is on.echo $parts[0]." OnAir"; // Instead of just saying DJ XYZ OnAir, we can echo out an image based on one located in// a folder called djimages where the image filename is the same as the djname used like this:// echo "djimages/jukebox.png".$parts[0].".jpgAuto DJ";}?>Reply With QuoteReply With Quote11-05-2017, 10:10 PM can it be of any use for icecast2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now