Page 5 of 5 FirstFirst ... 345
Results 41 to 44 of 44

Thread: on air script

  1. #41

    Title
    Junior Broadcaster
    Join Date
    Oct 2012
    Posts
    85
    Rep Power
    6
    so it would go <head>meta</head>

  2. #42
    James's Avatar
    Title
    Administrator
    Join Date
    Jan 2008
    Location
    Melbourne, Australia
    Posts
    12,135
    Rep Power
    10

  3. #43

    Title
    Junior Broadcaster
    Join Date
    Oct 2012
    Posts
    85
    Rep Power
    6
    ok think i have it

    <!DOCTYPE html>
    <html>
    <meta http-equiv="refresh" content="30"/>
    <head>


    </head>


    <body>
    <div align=right><!DOCTYPE html>
    <html>
    <body>


    <p><font color="red"><?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 = '<p><font color="red">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' => "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 < count($shows); $i++) {
    if($shows[$i]['day'] == $now_day && $shows[$i]['start_time'] >= $now_time && $shows[$i]['end_time'] < $now_time) {
    $output = array($shows[$i]['show_name'], $shows[$i]['image']);
    }
    }








    return $output;








    }
    ?>
    DJ Now On Air: <br />
    <img src="<?php echo onAirNow()[1]; ?>"><br />
    <h3><?php echo onAirNow()[0]; ?></h3></font></p>
    </body>


    </html>

  4. #44

    Title
    Junior Broadcaster
    Join Date
    Oct 2012
    Posts
    85
    Rep Power
    6
    i dont get it i have put 18 for start time and 20 for end time its not working

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •