Are there any simple ways to run a PHP script when a file is added to a specific directory?
On linux there are perfect tools for this like inotify/dnotify, can’t find any for Windows.
If I run a PHP script that loops infinitely – will that make a significant impact on cpu performance (if all it does is check folder for contents)?
I read that Win32::ChangeNotify could be used, but I’m a noob in Perl, so I have no idea how to set it up.
The easiest way to manage this would be to create a cron job that runs your script every minute (or however often you wish to check).
Edit – Just read the post again, and it hit me that you’re using Windows. I suppose you can use Scheduled Tasks to do this.