Results 1 to 2 of 2
-
10-05-2008, 03:33 PM #1Aspiring Evangelist
- 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
-
10-05-2008, 03:47 PM #2WHT Addict
- 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';
}