Log in

View Full Version : I am looking for a PHP code that would change an image depending on the time of day.



ayeayeshrew
08-10-2007, 10:46 PM
I tried searching Google, but couldn't find a code that would work for me. I would like a code that would change between two images depending on the hour of the day. For me, I would use image 1 between 6 and 7 am, 2 and 3 pm, and 10 and 11 pm, and image 2 the rest of the time. Also, is there a way to make it so that the url of the image stays the same, or would I have to use a different type of code?

Sorry if this sounds confusing! If you want me to explain more I certainly will!

djr33
08-11-2007, 01:30 AM
Do a search. There are a number of threads about just this, written in PHP and in javascript.