Time-based image rotation script


Posted on 16th Feb 2014 07:03 pm by admin

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.

Did you know?Explore Trending and Topic pages for more stories like this.
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.

Thanks
No comments posted yet

Your Answer:

Login to answer
260 Like 50 Dislike
Previous forums Next forums
Other forums

problem with php mysql query
Hi guy's...

I'm totally lost here..because don't have any idea how to make a query for grab r

2 things: enter doesn't work in IE & empty form
i have this search form that works well except for 2 things.

1) on IE when i hit enter instea

problems with php variables in mysql query
i can't seem to get the following query to work.

select $q1c from $vote_rate where id = $re

writing my own sobel filter convolution - something is wrong
I am trying to keep it very simple, I cant see anything wrong with my logic, could anybody help poin

Help building / using array
First - this is a cross-posting, if this is wrong I apologise! What started out as a MySQL query que

HTML form problem
Ive made a form to that i want to send to my email via PHP. but when it send only the name's etc sen

upload image name with extension using php
hi frds..

<input id="file1" type="file" name="file[]" &a

Better Method of a Member Cloud
I assume most people know how tag clouds work, where the tags most used are bigger and the least use

Greek characters in php
Hi,

I'm making a script and I m using for first time greek characters.
I started to write

Select question
Hi,

First I would like to say that php is pretty new for me..
so please don't shoot me if

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash