开发者

Helper script/tool for "one a day" reminders applications

开发者 https://www.devze.com 2022-12-11 00:13 出处:网络
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 Bri开发者_Stack

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 Bri开发者_StackOverflow中文版dal 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.


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".


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


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

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号