I have a PHP/MySQL web site, running on IIS. There are a handful of stand-alone compiled apps (exe) that also add records to the database. I want to set it up so that any time an exe adds a record to a certain table in the DB, it triggers a PHP script to run.
Unfortunately, the compiled apps cannot be modified. So I cannot simply have the exe call the PHP script. Somehow either MySQL needs to call the script on update, or PHP has to notice any time a record is added.
[EDIT TO ADD: I've seen solutions that suggest using MySQL triggers and MySQL add-ons to execute PHP from within MySQL, but there are both security and performance issues with such solutions that I would rather not deal with. Also the issue that such triggers happen mid-transaction and are synchronous with the triggered PHP script, meaning the PHP script can't actually see the data that was altered because it doesn't exist yet (transaction hasn't finalized.)]
I'm sure I could make a scheduled task to run a PHP script to check the DB table for new records every couple minutes; but I was wondering if there is any way to do this more directly and cleanly. Security of course is a plus.
(NOTE: For reasons I won't get in to, I'm still running MySQL 5.6. Hoping to get it updated soon. PHP is on 8.1)