Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2006
    Posts
    395

    Pictures to rotate depends on time

    Hi, somebody direct me to resource I am looking for.

    I would like my website to do this.

    In the morning - picture of the Sun will show.
    At night - picture of the moon will show instead of the Sun

    Is it possible to rotate pictures automatically depends on time of the day?

    Let me know

  2. #2
    Join Date
    Nov 2005
    Posts
    123
    PHP Code:
    $sunrise date_sunrise(time(), SUNFUNCS_RET_TIMESTAMP);
    $sunset  date_sunset(time(), SUNFUNCS_RET_TIMESTAMP);
    if ((
    time() > $sunrise) && (time() < $sunset)) {
        echo 
    'Sun';
    } else {
        echo 
    'Moon';


Posting Permissions

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