开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜