RE: [PHP] Infinate looping
| From: | Stephen Craton | Date: | Sun, 19 Sep 2004 16:20:01 +0000 |
| Subject: | RE: [PHP] Infinate looping | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-197202@lists.php.net to get a copy of this message | ||
::
:: Personally, I think you're taking the wrong approach to solve your
:: problem. PHP scripts were meant to execute in short fashion, to get
:: over and done with. If you need something that checks for changes,
:: don't make the PHP script run from now until doomsday, set it up as a
:: scheduled task that runs every minute (or whatever interval you
:: require). It's a much cleaner setup, and you're removing the
:: webserver from the equation since you'll be running PHP from the
:: command line.
::
Yes, I agree, if I were making a task to run every few minutes it would be
easier, but that's not exactly what I'm doing. I'm more or less streaming
content from the database to the end-user. It's basically a chat script that
I'm running.
I thought about setting up a socket, but I'm not sure if that's even aloud
on the mainstream web hosts, or is it?
Thanks,
Stephen Craton