Create on on-air now display

This is a discussion on "Create on on-air now display" within the PHP Forum section. This forum, and the thread "Create on on-air now display are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Sep 30th, 2006, 09:29
Junior Member
Join Date: Jan 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Question Create on on-air now display

I am currently constructing a website for a radio station. I know a bit of php scripting.

I want to know how to make an on-air now display on the website that i am making for the radio station that will change according to the time.


This is what i mean...
-----------------------------------
Program: Drivetime
Presenter: Laurence
Time: 15:00 - 18:00
------------------------------------




Thanks

Last edited by Drgreenfingers; Sep 30th, 2006 at 14:26.
Reply With Quote

  #2 (permalink)  
Old Sep 30th, 2006, 14:07
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to ukgeoff
Re: Create on on-air now display

Do you think you could be a bit more specific.

I mean, I could make one from a piece of string and card with some red letters on it and hang it on the door but I suspect you are looking for something more.
Reply With Quote
  #3 (permalink)  
Old Sep 30th, 2006, 18:26
Reputable Member
Join Date: Jul 2005
Location: Melksham, Wilts, UK
Posts: 293
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Create on on-air now display

DrGreenFingers - looks a straighforward enough question to me. I think you're looking for code something like:

Code: Select all
<?php
$hour = date("G");
if ($hour < 5) {
        $prog = "The night show";
        $time = "Midnight - 05:00";
} elseif ($hour < 8) {
        $prog = "Drive to work";
        $time = "05:00 - 08:00";
} elseif ($hour < 12) {
        $prog = "Morning run";
        $time = "08:00 - Midday";
} elseif ($hour < 17) {
        $prog = "Afternoon delight";
        $time = "Midday - 17:00";
} else {
        $prog = "Nothing on the Tele";
        $time = "17:00 - Midnight";
}
?>
<html>
<body>
Your standard information, etc<br>
Currently playing - <?= $prog ?> 
( <?= $time ?> )<br>
And more standard text
</body>
</html>
Which gives you a page that read (at the moment, because it's after 5 p.m.

Your standard information, etc
Currently playing - Nothing on the Tele ( 17:00 - Midnight )
And more standard text


Note - this is just a simple "training example". I would much prefer you to have a slightly more complex program that reads the data from a file or database and handles programs that don't end on the exact hour and vary depending on the day of the week.
Reply With Quote
  #4 (permalink)  
Old Sep 30th, 2006, 22:30
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to ukgeoff
Re: Create on on-air now display

DrGreenFingers:

Apologies. Somehow I seem to have completely misread your post hence the flippant response.
Reply With Quote
Reply

Tags
create, onair, now, display

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
what site create? mcnika Website Planning 4 Jun 6th, 2008 15:04
How to create this . . WDH Web Page Design 9 Nov 13th, 2007 18:02
Does this look good enough to create? limezor Graphics and 3D 5 Aug 29th, 2007 09:12
I would like to create a layout kool77 Graphics and 3D 5 Jun 26th, 2007 13:41
Is something like this too difficult to create? andresnav Introduce Yourself 7 Nov 19th, 2006 05:58


All times are GMT. The time now is 08:17.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43