Use PHP to display an image for 5 minutes every time the hour changes -


i have been looking way using php display 'imagea.jpg' during 5 minutes every time hour changes, , go displaying 'imageb.jpg' remaing 55 minutes - until 'imagea.jpg' displaying again.

example:

  • 00:00 - 00:05 = display image
  • 00:06 - 00:59 = display image b
  • 01:00 - 01:05 = display image a
  • 01:06 - 01:59 = display image b

etc.

do this:

if (date('i') <= 5)    echo "<img src="imagea.jpg" />"; else    echo "<img src="imageb.jpg" />"; 

edit: image will, of course, change when reload page.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -