I think I figured an easy way.
I'll just run a timer and poll a database every X seconds in the app to look for a change and execute the already written procedures then.
the php will merely have to change the data in the table.
seems easy enough and it should work!