How to check if directory contents has changed with PHP?
As already mentioned by others, a better way to solve this would be to trigger a function when particular events happen, that changes the folder. However, if your server is a unix, you can use inotifywait to watch the directory, and then invoke a PHP script. Here’s a simple example: #!/bin/sh inotifywait –recursive –monitor –quiet … Read more