Using php to pop an array stack (or iterate through a text file) on a timed interval
I want to set up a small php script which simply returns a string, either from an array or from a line in a text file. As well as returning the string any time this script is called, I also want it to automatically cycle through the set of items (either an array or each line in a text file) on a timed basis. For example, every 15 minutes I want the script to step through each item in the list. I've not actually done anything like this before, so i'd be interested to hear any advice. Thank开发者_StackOverflows
You have to use CRON JOBS. If you have admin rights then you can easily set up cron jobs to run your scripts by second,minute hour or day. Just add your script to a cron tab along with the intervals. Look below for instructions
http://adminschoice.com/crontab-quick-reference
As for the PHP script i guess you must have found it out by now.
精彩评论