View Full Version : Creating time sensitive links

Golden Child
01-11-2012, 07:17 PM
Hello again,

I am trying to create a link button on a website for a client that only directs to a certain external website on certain days and hours. Specifically, this is a web radio button that the client only wants to link to the web radio site when their live broadcast is on the air during certain hours on the weekend (i.e. Sundays 8-10 PM). Any other time, the client wants the web radio button to link to a default page since the web radio station plays unrelated music all other hours of the week. Does anyone know the best way to create such a time sensitive link for a button on a webpage?


01-12-2012, 06:09 AM
You'll need to use php for this one. If you know the specific times then you could use php to check against these times then remove the link based upon this.

I would also recommend changing the look of the button, in fact I would probably use a big on air or off air like the large radio stations do.

There may be others ways of achieving this but that's probably the easiest.

There are a couple of php guys on this forum but your quickest bet will be to ask on a specific php forum for some starter code, you may even be able to find something online.

I use php freaks, great forum and some of the guys on there are writing php all day every day so know their stuff. I could probably have a stab but you'll be best asking some else not my area of expertise.


01-12-2012, 06:14 AM
Just done a very quick search but it's this type of thing. Set the time zone then declare the times then tell it what you want it to do.

Ie echo out a link with a class of on air / off air you can then use CSS to style these.

Should give you an idea, I'd still ask though