Posted by Colin McKinnon on 07/13/05 11:25
Gordon Burditt wrote:
>>is it possible to have a php script running as a daemon in the
>>background that automatically performs something (ie, a php script)
>>when a file is updated in a specific folder/directory?
>
> Command-line-only PHP does exist but it may not be present on
> hosted sites if the host didn't build it. Such a script won't
> "automatically perform"; it will need to check periodically and
> do something if needed.
>
Quack - oops. Thanks for playing.
There's nothing to stop you writing a daemon in PHP. Although if it's not a
server process I'd use cron as well.
>>background that automatically performs something (ie, a php script)
>>when a file is updated in a specific folder/directory?
There are some (non-PHP) tools out there which are designed for exactly this
purpose. Some intercept the writes, some poll changes - either way, these
might be a more sensible starting place then cron (they will (appear to)
operate synchronously with the event). Check out dazuko, FAM and Gamin
C.
[Back to original message]
|