|
|
|
|
|
|
|
![]() |
#1 |
a.k.a. Sparky
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
|
dayrotate.pl
Code:
#!/usr/bin/perl use File::Copy; @weekdays = ('sunday.jpg','monday.jpg','tuesday.jpg','wednesday.jpg', 'thursday.jpg','friday.jpg','saturday.jpg'); my ($sec,$min,$hour,$mday,$mon,$year, $wday,$yday,$isdst) = localtime time; copy($weekdays[$wday],'today.jpg'); copy($weekdays[($wday==0?7:($wday-1))],'yesterday.jpg'); copy($weekdays[($wday<1?($wday+6):($wday-2))],'twodaysago.jpg'); copy($weekdays[($wday<2?($wday+5):($wday-3))],'threedaysago.jpg'); Code:
0 0 * * * cd /var/www/domain.com/images/;/usr/bin/perl /var/www/domain.com/images/dayrotate.pl > /dev/null in your html, you refer to today.jpg, yesterday.jpg, twodaysago.jpg and threedaysago.jpg
__________________
SnapReplay.com a different way to share photos - iPhone & Android |
![]() |
![]() |
![]() |
|
|