Results 1 to 2 of 2

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

  1. #1
    Join Date
    Aug 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default I am looking for a PHP code that would change an image depending on the time of day.

    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!

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Do a search. There are a number of threads about just this, written in PHP and in javascript.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •