Tutorial :Helper script/tool for “one a day” reminders applications



Question:

I am looking for a helper tool/ script that can be used to power an application that presents some randomized content periodically eg once per day. Example applications are "One a Day Bridal Prep", "Daily Quotations", "Daily Programming Tips" etc etc It is simple enough to code one up myself but I am wondering if I don't need to reinvent the wheel here. I am working with php/mysql but am open to working with scripts that are made with other languages.


Solution:1

If you want to make in PHP, do the following: create your PHP file that gets the quote of the day from the database, and run it once a day with a cronjob, redirect the output to a file and include the file in your desired webpage.

[EDIT:]

As Franz said, you can do it without a cronjob as well, cronjobs have the advantage of being able to run complex scripts (like getting content via cURL) and doing it in any scripting language you might think is "better".


Solution:2

fortune does this quite nicely. It's commonly found on unix systems. PEAR shows a PHP module for reading standard fortune files.


Solution:3

I actually found quite a few Quote of the Day application scripts from hotscripts.

http://www.hotscripts.com/category/php/scripts-programs/quote-display/


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »