Jump to content

Image Rotator based on Minutes


redfieldr

Recommended Posts

I'm the web master for a local radio station, but am not a php pro in any context of the word.  I was able to fumble my way through php in order to set up an hourly image rotator for the top of the site.

(It displays which announcer is on the air).

 

I'm wanting to do the same for our contests, but they fall at various times (7:50am, 12:20pm, etc).

 

One segment of the rotator script appears like this:

 

<?php

 

// Get the day of week (Sun=0, Mon=1 ... Sat=6)

$day=date("w");

 

// If it's Mon-Fri, check the time

if($day ==0){

 

  // Get the Hour (24 hr)

  $hour=date("G");

 

  // between times?

  if($hour >= 0  &&  $hour < 13){

 

  // Display your image here

  echo "<img src='http://www.station.com/timer/images/rotator_img.png' alt='' /><br />";

 

  }

}

 

It works fine for hours, but I cannot for the life of me figure out how to convert it for use with Minutes (I want to display "Next Contest Coming Up" and "TUNE IN NOW to play" images).

 

Thanks in advance for whomever can point me in the right direction.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.