Jump to content

Time-based image rotation script


jonloovox

Recommended Posts

Hi PHP Freaks!

 

I'm trying to write a PHP script that rotates an image based on what time of day it is.  I want the script to show day.jpg from 6 AM to 6 PM, and to show night.jpg from 6 PM to 6 AM.

 

I also need the rotation to take place based not on server time, but on the local time of the user viewing the page.

 

I've Google-searched this for hours and only found stuff that is similar but doesn't do what I want.  I don't want the rotation to be "every X minutes" and I don't want it to be based on the date, but rather on the exact time of day based on a user's local time.

 

Thank you SO much.  This is very important to me.

 

Best,

 

Robert

Link to comment
https://forums.phpfreaks.com/topic/178064-time-based-image-rotation-script/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.