php web infinite loop - how to stop
I need to write php code to routinely check for the feed of a specific website and send email to users if there is something new. The php code should run forever when it is started. However, my problem is that sometimes, my client want to manually turn off the script without using terminal. Can I stop a php script using another script or what can I do for this case?
Client only give me ftp 开发者_JAVA技巧access to an apache server, so I cannot use some other techniques like Python and Perl or terminal, which I believe should be easier for this task
use a file.
make your script check presence of some file, say, stop.flag
in every iteration
if so - stop it
精彩评论