> I'm going to create a small chat script with PHP. The messages you want 
> others to see
> will be added to a flat file (I.E. TXT file), and read and displayed by PHP. 
> However, I want
> this reading and displaying to be periodic. This means that I want PHP to 
> check the file for
> new lines every,say, fifteen seconds. How may I do that? I have been unable 
> to find any
> function that acts like a timer.

If you're on Unix then look into using cron. Type the following at the
command prompt to get info on cron:

man 5 crontab

Cron tasks can be scheduled at most once per minute. And if you're
using Windows then I believe the equivalent would be task scheduler,
but I've no idea how you would go about using it.

Richard Heyes
HTML5 graphing: RGraph (www.rgraph.net - updated 6th June)
PHP mail: RMail (www.phpguru.org/rmail)
PHP datagrid: RGrid (www.phpguru.org/rgrid)
PHP Template: RTemplate (www.phpguru.org/rtemplate)
PHP SMTP: http://www.phpguru.org/smtp

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to