
cir
Novice
Feb 12, 2001, 11:16 AM
Post #4 of 5
(584 views)
|
|
Re: Daily updater -devotional style
[In reply to]
|
Can't Post
|
|
I have something similar that prints a verse everyday: http://ajcorp.tripod.com/cir/codedaily.shtml Here's how I do it: ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); then I open the file with all the verses and create an array: open(DAILY, "./dailyfile"); @daily = <DAILY>; close(DAILY); $day = join('', @daily); @daily = split(/\%\%/, $day); And then all you have to do is: print "$daily[$yday]"; Of coarse you could use cron.... if your server supports it. You should note that each verse is seperated by %% http://
(This post was edited by cir on Feb 12, 2001, 10:19 AM)
|