CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Need a Custom or Prewritten Perl Program?: I need a program that...:
Daily updater -devotional style

 



MTO
Deleted

Feb 5, 2001, 12:19 PM

Post #1 of 5 (790 views)
Daily updater -devotional style Can't Post

I have been searching for 3 weeks, I only find javascripts that do this:
I need to display a different content depending on the day of the month. The content would be ready at least a month ahead. The script should simply check the date, and depending on the date, show a different content.

Searching I found some similar scripts that either displayed randomly (I dont want random but by dates), or when by dates, they are only capable of displaying quotes. I need more than quotes... like as if it was a devotional for every day, with html tags and all...



cpdp
Deleted

Feb 5, 2001, 12:24 PM

Post #2 of 5 (789 views)
Re: Daily updater -devotional style [In reply to] Can't Post

Does the Web Server your using support Server Side Includes (SSI) ?

JpT

http://toarmino.com
Custom Perl
Database Programming


MTO
Deleted

Feb 5, 2001, 7:45 PM

Post #3 of 5 (786 views)
Re: Daily updater -devotional style [In reply to] Can't Post

Yes, it does. Any suggestions? Smile



cir
Novice

Feb 12, 2001, 11:16 AM

Post #4 of 5 (762 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)


MTO
Deleted

Feb 14, 2001, 10:03 AM

Post #5 of 5 (754 views)
Re: Daily updater -devotional style [In reply to] Can't Post

Thanks, thanks, thanks Smile.
I will look into it right now. Wink
Thanks.


 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives