djaubs89 Posted August 4, 2017 Share Posted August 4, 2017 hello rite no one has helped me out with a script for on air i know papabear has helped but that script is not working. were looking for a script that 106themix had on there site when they was running i know some people use mysql for running there script but i would rather not. please if anyone can help me with a script like 106themix had that would be "great" many thanks Link to comment Share on other sites More sharing options...
GKIye Posted August 4, 2017 Share Posted August 4, 2017 At this forum of BW You can find the attached script. It "works", I use it also. It shows "Artist - Song" at every rotation ... so also if an ID etc is played Please check the attached zip file The folder and text file with the code for your website are included Enjoy !SongOnline.zip Visit and listen @ BW ! Link to comment Share on other sites More sharing options...
djaubs89 Posted August 5, 2017 Author Share Posted August 5, 2017 im looking for an on air script which shows when the djs are on air but a script what 106themix had Link to comment Share on other sites More sharing options...
djaubs89 Posted August 5, 2017 Author Share Posted August 5, 2017 i have this code = '0600' && $time "; break; case ($time >= '1000' && $time "; break; default: echo"images/jukebox.gif"; break; } } elseif($day == 6) { echo"images/jukebox.gif"; } else { switch($time) { case ($time >= '0600' && $time "; break; case ($time >= '1000' && $time "; break; case ($time >= '1500' && $time "; break; case ($time >= '1900' && $time "; break; case ($time >= '2400' && $time "; default: echo"images/jukebox.gif"; break; } } ?> but what time zone do i put it in as im in united kingdom Link to comment Share on other sites More sharing options...
James Posted August 7, 2017 Share Posted August 7, 2017 Here's a list of supported timezones: http://php.net/manual/en/timezones.php "Europe/London" is what you are looking to use for the timezone. Studiio - All-In-One Radio Communication Platform SMS | Phone Calls | Social Media | Content Link to comment Share on other sites More sharing options...
James Posted August 7, 2017 Share Posted August 7, 2017 You could try something like this (whipped this up quickly): function onAirNow() { // James' Show On Air Script // http://broadcastingworld.com/ // Set the timezone // See full list of timezones here: http://php.net/manual/en/timezones.php date_default_timezone_set('America/Los_Angeles'); // Set default text | When a show is not on air, this text will display $default_on_air = ''; // Shows array, edit this information for each show $shows = [ [ 'show_name' => "Sample Show", // Show name 'day' => "Monday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 9, // Start Time (24 hour format) 'end_time' => 11 // End Time (24 hour format) ], [ 'show_name' => "The Best Show In The World", // Show name 'day' => "Tuesday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 12, // Start Time (24 hour format) 'end_time' => 13 // End Time (24 hour format) ], [ 'show_name' => "Test Show", // Show name 'day' => "Thursday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 14, // Start Time (24 hour format) 'end_time' => 16 // End Time (24 hour format) ] ]; ///////////////////////////////////////////////////// ////////// DO NOT EDIT BELOW THIS LINE ////////////// ///////////////////////////////////////////////////// $now_day = date('l'); $now_time = date('G'); $output = $default_on_air; for($i = 0; $i if($shows[$i]['day'] == $now_day && $shows[$i]['start_time'] >= $now_time && $shows[$i]['end_time'] $output = $shows[$i]['show_name']; } } return $output; } ?> Simply copy and paste this code on your website and then include this code wherever you want the DJ/Show on air to appear: Remember to edit the info in the script above the line with your show/dj details, timezone and default text. Let me know if you have any issues. Studiio - All-In-One Radio Communication Platform SMS | Phone Calls | Social Media | Content Link to comment Share on other sites More sharing options...
djaubs89 Posted August 30, 2017 Author Share Posted August 30, 2017 (edited) so if i want friday saturday and sunday were am i meant to put the images for that and i don't get this script could you help out please Edited August 30, 2017 by djaubs89 Link to comment Share on other sites More sharing options...
James Posted August 30, 2017 Share Posted August 30, 2017 (edited) so if i want friday saturday and sunday were am i meant to put the images for that and i don't get this script could you help out please You add the shows to the array and change the variables required. For example if you had three shows, two on Friday, one on Saturday and one on Sunday, it would look like this: // James' Show On Air Script // http://broadcastingworld.com/ // Set the timezone // See full list of timezones here: http://php.net/manual/en/timezones.php date_default_timezone_set('America/Los_Angeles'); // Set default text and default image | When a show is not on air, this text and image will display $default_on_air = ''; // Default text $default_image_on_air = ''; // Default image // Shows array, edit this information for each show $shows = [ [ 'show_name' => "Friday Show 1", // Show name 'day' => "Friday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 9, // Start Time (24 hour format) 'end_time' => 11, // End Time (24 hour format) 'image' => 'http://lorempixel.com/400/200' ], [ 'show_name' => "Friday Show 2", // Show name 'day' => "Friday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 11, // Start Time (24 hour format) 'end_time' => 14, // End Time (24 hour format) 'image' => 'http://lorempixel.com/400/200' ], [ 'show_name' => "Saturday Show", // Show name 'day' => "Saturday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 15, // Start Time (24 hour format) 'end_time' => 18, // End Time (24 hour format) 'image' => 'http://lorempixel.com/400/200' ], [ 'show_name' => "Sunday Show", // Show name 'day' => "Sunday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 14, // Start Time (24 hour format) 'end_time' => 16 // End Time (24 hour format), 'image' => 'http://lorempixel.com/400/200' ] ]; ///////////////////////////////////////////////////// ////////// DO NOT EDIT BELOW THIS LINE ////////////// ///////////////////////////////////////////////////// $now_day = date('l'); $now_time = date('G'); $output = array($default_on_air, $default_image_on_air); for($i = 0; $i if($shows[$i]['day'] == $now_day && $shows[$i]['start_time'] >= $now_time && $shows[$i]['end_time'] $output = array($shows[$i]['show_name'], $shows[$i]['image']); } } return $output; } ?> Then when you want to display the show name, simply paste this: If you want to display the image, simply paste this: ------------------------ This code hasn't been tested, so let me know if this doesn't work. Edited August 31, 2017 by James Studiio - All-In-One Radio Communication Platform SMS | Phone Calls | Social Media | Content Link to comment Share on other sites More sharing options...
djaubs89 Posted August 31, 2017 Author Share Posted August 31, 2017 (edited) ok so i have this // James' Show On Air Script // [url]http://broadcastingworld.com/[/url] // Set the timezone // See full list of timezones here: [url]http://php.net/manual/en/timezones.europe.php[/url] date_default_timezone_set('Europe/London'); // Set default text and default image | When a show is not on air, this text and image will display $default_on_air = ''; // Default text $default_image_on_air = ''; // Default image // Shows array, edit this information for each show $shows = [ [ 'show_name' => "Friday Show ", // 80s 'day' => "Friday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 18, // Start Time (24 hour format) 'end_time' => 20 // End Time (24 hour format), 'image' => 'http://urban-radio.co.uk/images/strawbs.jpg' ], [ ], [ 'show_name' => "Saturday Show", // 80s 'day' => "Saturday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 18, // Start Time (24 hour format) 'end_time' => 20 // End Time (24 hour format), 'image' => 'http://urban-radio.co.uk/images/strawbs.jpg' ], [ 'show_name' => "Sunday Show", // 80s 'day' => "Sunday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 18, // Start Time (24 hour format) 'end_time' => 20 // End Time (24 hour format), 'image' => 'http://urban-radio.co.uk/images/strawbs.jpg' ] ]; ///////////////////////////////////////////////////// ////////// DO NOT EDIT BELOW THIS LINE ////////////// ///////////////////////////////////////////////////// $now_day = date('l'); $now_time = date('G'); $output = array($default_on_air, $default_image_on_air); for($i = 0; $i if($shows[$i]['day'] == $now_day && $shows[$i]['start_time'] >= $now_time && $shows[$i]['end_time'] $output = array($shows[$i]['show_name'], $shows[$i]['image']); } } return $output; } ?> but were do i put monday tuesday wednesday thursday Edited August 31, 2017 by James Link to comment Share on other sites More sharing options...
djaubs89 Posted August 31, 2017 Author Share Posted August 31, 2017 ok this script is not working Link to comment Share on other sites More sharing options...
James Posted August 31, 2017 Share Posted August 31, 2017 (edited) You have put data in a comment rather than the actual script. Here is the script running perfectly fine: https://www.tehplayground.com/PLFCyp96cBBFRtBL I recommend reading a bit more about PHP if you wish to explore scripts like this, otherwise post your show schedule info and I can assist in creating the script. Usually this is a service that I charge for but im happy to guide you on the right track. I have also wrapped the code in [ CODE ] tags. Please use these so that the code is displayed correctly. Edited August 31, 2017 by James Studiio - All-In-One Radio Communication Platform SMS | Phone Calls | Social Media | Content Link to comment Share on other sites More sharing options...
djaubs89 Posted August 31, 2017 Author Share Posted August 31, 2017 ok mine is working great ;) now how do i change to text colour Link to comment Share on other sites More sharing options...
James Posted August 31, 2017 Share Posted August 31, 2017 ok mine is working great ;) now how do i change to text colour Have a read up on HTML in order to style your text. https://www.w3schools.com/html/html_styles.asp Studiio - All-In-One Radio Communication Platform SMS | Phone Calls | Social Media | Content Link to comment Share on other sites More sharing options...
djaubs89 Posted August 31, 2017 Author Share Posted August 31, 2017 i don't see anywere in the script to change the colour of the text though Link to comment Share on other sites More sharing options...
djaubs89 Posted August 31, 2017 Author Share Posted August 31, 2017 i want this part of the script $default_on_air = 'No DJ is on air'; // Default text in red Link to comment Share on other sites More sharing options...
djaubs89 Posted August 31, 2017 Author Share Posted August 31, 2017 don't worry i have sorted it, but one small problem. does that script work with the rest of the week? and will it show my image /images/strawbs.png from 18 to 20 friday saturday and sunday Link to comment Share on other sites More sharing options...
James Posted August 31, 2017 Share Posted August 31, 2017 don't worry i have sorted it, but one small problem. does that script work with the rest of the week? and will it show my image /images/strawbs.png from 18 to 20 friday saturday and sunday Yes it works with any day as shown in the script comments (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday). You will have to set up a new array item for each of those days for those time periods. Studiio - All-In-One Radio Communication Platform SMS | Phone Calls | Social Media | Content Link to comment Share on other sites More sharing options...
djaubs89 Posted August 31, 2017 Author Share Posted August 31, 2017 like this // Set the timezone // See full list of timezones here: http://php.net/manual/en/timezones.europe.php date_default_timezone_set('Europe/London'); // Set default text and default image | When a show is not on air, this text and image will display $default_on_air = 'No DJ is on air'; // Default text $default_image_on_air = 'http://urban-radio.co.uk/images/jukebox.gif'; // Default image // Shows array, edit this information for each show $shows = [ [ 'show_name' => "Monday", // 80s 'day' => "Monday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 01, // Start Time (24 hour format) 'end_time' => 20, // End Time (24 hour format) 'image' => 'http://urban-radio.co.uk/images/jukebox.gif' 'show_name' => "Tuesday", // 80s 'day' => "Tuesday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 01, // Start Time (24 hour format) 'end_time' => 20, // End Time (24 hour format) 'image' => 'http://urban-radio.co.uk/images/jukebox.gif' 'show_name' => "Wednesday", // 80s 'day' => "Wednesday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 01, // Start Time (24 hour format) 'end_time' => 20, // End Time (24 hour format) 'image' => 'http://urban-radio.co.uk/images/jukebox.gif' 'show_name' => "Thursday", // 80s 'day' => "Thursday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 01, // Start Time (24 hour format) 'end_time' => 20, // End Time (24 hour format) 'image' => 'http://urban-radio.co.uk/images/jukebox.gif' 'show_name' => "Friday Show 1", // 80s 'day' => "Friday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 18, // Start Time (24 hour format) 'end_time' => 20, // End Time (24 hour format) 'image' => 'http://urban-radio.co.uk/images/strawbs.jpg' ], [ 'show_name' => "Friday Show 2", // 80s 'day' => "Friday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 18, // Start Time (24 hour format) 'end_time' => 20, // End Time (24 hour format) 'image' => 'http://urban-radio.co.uk/images/strawbs.jpg' ], [ 'show_name' => "Saturday Show", // 80s 'day' => "Saturday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 18, // Start Time (24 hour format) 'end_time' => 20, // End Time (24 hour format) 'image' => 'http://urban-radio.co.uk/images/strawbs.jpg' ], [ 'show_name' => "Sunday Show", // 80s 'day' => "Sunday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 18, // Start Time (24 hour format) 'end_time' => 20, // End Time (24 hour format) 'image' => 'http://urban-radio.co.uk/images/strawbs.jpg' ] ]; ///////////////////////////////////////////////////// ////////// DO NOT EDIT BELOW THIS LINE ////////////// ///////////////////////////////////////////////////// $now_day = date('l'); $now_time = date('G'); $output = array($default_on_air, $default_image_on_air); for($i = 0; $i = $now_time && $shows[$i]['end_time'] return $output; } ?>DJ Now On Air: <?php echo onAirNow()[1]; ?> Link to comment Share on other sites More sharing options...
James Posted September 1, 2017 Share Posted September 1, 2017 Could you format it a bit better sorry? Im unable to read the code. Studiio - All-In-One Radio Communication Platform SMS | Phone Calls | Social Media | Content Link to comment Share on other sites More sharing options...
djaubs89 Posted September 1, 2017 Author Share Posted September 1, 2017 is this ok <?php function onAirNow() { // James' Show On Air Script // http://broadcastingworld.com/ // Set the timezone // See full list of timezones here: http://php.net/manual/en/timezones.europe.php date_default_timezone_set('Europe/London'); // Set default text and default image | When a show is not on air, this text and image will display $default_on_air = 'No DJ is on air'; // Default text $default_image_on_air = 'http://urban-radio.co.uk/images/jukebox.gif'; // Default image // Shows array, edit this information for each show $shows = [ [ 'show_name' => "Monday", // 80s 'day' => "Monday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 01, // Start Time (24 hour format) 'end_time' => 20, // End Time (24 hour format) 'image' => 'http://urban-radio.co.uk/images/jukebox.gif' 'show_name' => "Tuesday", // 80s 'day' => "Tuesday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 01, // Start Time (24 hour format) 'end_time' => 20, // End Time (24 hour format) 'image' => 'http://urban-radio.co.uk/images/jukebox.gif' 'show_name' => "Wednesday", // 80s 'day' => "Wednesday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 01, // Start Time (24 hour format) 'end_time' => 20, // End Time (24 hour format) 'image' => 'http://urban-radio.co.uk/images/jukebox.gif' 'show_name' => "Thursday", // 80s 'day' => "Thursday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 01, // Start Time (24 hour format) 'end_time' => 20, // End Time (24 hour format) 'image' => 'http://urban-radio.co.uk/images/jukebox.gif' 'show_name' => "Friday Show 1", // 80s 'day' => "Friday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 18, // Start Time (24 hour format) 'end_time' => 20, // End Time (24 hour format) 'image' => 'http://urban-radio.co.uk/images/strawbs.jpg' ], [ 'show_name' => "Friday Show 2", // 80s 'day' => "Friday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 18, // Start Time (24 hour format) 'end_time' => 20, // End Time (24 hour format) 'image' => 'http://urban-radio.co.uk/images/strawbs.jpg' ], [ 'show_name' => "Saturday Show", // 80s 'day' => "Saturday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 18, // Start Time (24 hour format) 'end_time' => 20, // End Time (24 hour format) 'image' => 'http://urban-radio.co.uk/images/strawbs.jpg' ], [ 'show_name' => "Sunday Show", // 80s 'day' => "Sunday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 18, // Start Time (24 hour format) 'end_time' => 20, // End Time (24 hour format) 'image' => 'http://urban-radio.co.uk/images/strawbs.jpg' ] ]; ///////////////////////////////////////////////////// ////////// DO NOT EDIT BELOW THIS LINE ////////////// ///////////////////////////////////////////////////// $now_day = date('l'); $now_time = date('G'); $output = array($default_on_air, $default_image_on_air); for($i = 0; $i if($shows[$i]['day'] == $now_day && $shows[$i]['start_time'] >= $now_time && $shows[$i]['end_time'] $output = array($shows[$i]['show_name'], $shows[$i]['image']); } } return $output; } ?> DJ Now On Air: <?php echo onAirNow()[1]; ?> <?php echo onAirNow()[0]; ?> Link to comment Share on other sites More sharing options...
James Posted September 1, 2017 Share Posted September 1, 2017 Looks good, although Im not sure if you intend to name your shows "Monday", "Tuesday" etc.. You have replaced a comment with "80s". Studiio - All-In-One Radio Communication Platform SMS | Phone Calls | Social Media | Content Link to comment Share on other sites More sharing options...
djaubs89 Posted September 1, 2017 Author Share Posted September 1, 2017 ok how about now, as i have sorted it out. i can do the rest like add colour etc <?php function onAirNow() { // James' Show On Air Script // http://broadcastingworld.com/ // Set the timezone // See full list of timezones here: http://php.net/manual/en/timezones.europe.php date_default_timezone_set('Europe/London'); // Set default text and default image | When a show is not on air, this text and image will display $default_on_air = 'No DJ is on air'; // Default text $default_image_on_air = 'http://urban-radio.co.uk/images/jukebox.gif'; // Default image // Shows array, edit this information for each show $shows = [ [ 'show_name' => "JukeBox", // jukebox 'day' => "Monday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 01, // Start Time (24 hour format) 'end_time' => 20, // End Time (24 hour format) 'image' => 'http://urban-radio.co.uk/images/jukebox.gif' 'show_name' => "JukeBox", // jukebox 'day' => "Tuesday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 01, // Start Time (24 hour format) 'end_time' => 20, // End Time (24 hour format) 'image' => 'http://urban-radio.co.uk/images/jukebox.gif' 'show_name' => "JukeBox", // jukebox 'day' => "Wednesday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 01, // Start Time (24 hour format) 'end_time' => 20, // End Time (24 hour format) 'image' => 'http://urban-radio.co.uk/images/jukebox.gif' 'show_name' => "JukeBox", // JukeBox 'day' => "Thursday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 01, // Start Time (24 hour format) 'end_time' => 20, // End Time (24 hour format) 'image' => 'http://urban-radio.co.uk/images/jukebox.gif' 'show_name' => "80's Request", // 80s 'day' => "Friday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 18, // Start Time (24 hour format) 'end_time' => 20, // End Time (24 hour format) 'image' => 'http://urban-radio.co.uk/images/strawbs.jpg' ], [ 'show_name' => "80's Request", // 80s 'day' => "Friday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 18, // Start Time (24 hour format) 'end_time' => 20, // End Time (24 hour format) 'image' => 'http://urban-radio.co.uk/images/strawbs.jpg' ], [ 'show_name' => "80's Request", // 80s 'day' => "Saturday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 18, // Start Time (24 hour format) 'end_time' => 20, // End Time (24 hour format) 'image' => 'http://urban-radio.co.uk/images/strawbs.jpg' ], [ 'show_name' => "80's Request", // 80s 'day' => "Sunday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 18, // Start Time (24 hour format) 'end_time' => 20, // End Time (24 hour format) 'image' => 'http://urban-radio.co.uk/images/strawbs.jpg' ] ]; ///////////////////////////////////////////////////// ////////// DO NOT EDIT BELOW THIS LINE ////////////// ///////////////////////////////////////////////////// $now_day = date('l'); $now_time = date('G'); $output = array($default_on_air, $default_image_on_air); for($i = 0; $i if($shows[$i]['day'] == $now_day && $shows[$i]['start_time'] >= $now_time && $shows[$i]['end_time'] $output = array($shows[$i]['show_name'], $shows[$i]['image']); } } return $output; } ?> DJ Now On Air: <?php echo onAirNow()[1]; ?> <?php echo onAirNow()[0]; ?> Link to comment Share on other sites More sharing options...
James Posted September 1, 2017 Share Posted September 1, 2017 Great, working well now? Studiio - All-In-One Radio Communication Platform SMS | Phone Calls | Social Media | Content Link to comment Share on other sites More sharing options...
djaubs89 Posted September 1, 2017 Author Share Posted September 1, 2017 i will test it on our website and let you know Link to comment Share on other sites More sharing options...
djaubs89 Posted September 1, 2017 Author Share Posted September 1, 2017 just gives me this page is not working when i put this script up <?php function onAirNow() { // James' Show On Air Script // http://broadcastingworld.com/ // Set the timezone // See full list of timezones here: http://php.net/manual/en/timezones.europe.php date_default_timezone_set('Europe/London'); // Set default text and default image | When a show is not on air, this text and image will display $default_on_air = 'No DJ is on air'; // Default text $default_image_on_air = 'http://urban-radio.co.uk/images/jukebox.gif'; // Default image // Shows array, edit this information for each show $shows = [ [ 'show_name' => "JukeBox", // jukebox 'day' => "Monday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 01, // Start Time (24 hour format) 'end_time' => 20, // End Time (24 hour format) 'image' => 'http://urban-radio.co.uk/images/jukebox.gif' 'show_name' => "JukeBox", // jukebox 'day' => "Tuesday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 01, // Start Time (24 hour format) 'end_time' => 20, // End Time (24 hour format) 'image' => 'http://urban-radio.co.uk/images/jukebox.gif' 'show_name' => "JukeBox", // jukebox 'day' => "Wednesday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 01, // Start Time (24 hour format) 'end_time' => 20, // End Time (24 hour format) 'image' => 'http://urban-radio.co.uk/images/jukebox.gif' 'show_name' => "JukeBox", // JukeBox 'day' => "Thursday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 01, // Start Time (24 hour format) 'end_time' => 20, // End Time (24 hour format) 'image' => 'http://urban-radio.co.uk/images/jukebox.gif' 'show_name' => "80's Request", // 80s 'day' => "Friday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 18, // Start Time (24 hour format) 'end_time' => 20, // End Time (24 hour format) 'image' => 'http://urban-radio.co.uk/images/strawbs.jpg' ], [ 'show_name' => "80's Request", // 80s 'day' => "Friday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 18, // Start Time (24 hour format) 'end_time' => 20, // End Time (24 hour format) 'image' => 'http://urban-radio.co.uk/images/strawbs.jpg' ], [ 'show_name' => "80's Request", // 80s 'day' => "Saturday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 18, // Start Time (24 hour format) 'end_time' => 20, // End Time (24 hour format) 'image' => 'http://urban-radio.co.uk/images/strawbs.jpg' ], [ 'show_name' => "80's Request", // 80s 'day' => "Sunday", // Day (Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday) 'start_time' => 18, // Start Time (24 hour format) 'end_time' => 20, // End Time (24 hour format) 'image' => 'http://urban-radio.co.uk/images/strawbs.jpg' ] ]; ///////////////////////////////////////////////////// ////////// DO NOT EDIT BELOW THIS LINE ////////////// ///////////////////////////////////////////////////// $now_day = date('l'); $now_time = date('G'); $output = array($default_on_air, $default_image_on_air); for($i = 0; $i if($shows[$i]['day'] == $now_day && $shows[$i]['start_time'] >= $now_time && $shows[$i]['end_time'] $output = array($shows[$i]['show_name'], $shows[$i]['image']); } } return $output; } ?> DJ Now On Air: <?php echo onAirNow()[1]; ?> <?php echo onAirNow()[0]; ?> you try http://urban-radio.co.uk/test.php Link to comment Share on other sites More sharing options...
Recommended Posts