you should probably redesign... else, you can send an event to the server via AS or java or any other language SFS supports

i.e. a change was made to db via a php script, a reply is sent to the user about the change sucess, user sends an event to sfs extension, which then looks at a change that was made in the db... this is a bad design tho, you are better off just making changes to db via sfs, thus sfs will know what changes it has made (if you save them in a session or something)...
OR, you could use system calls, i.e. in php/c++ you could make something like:
//blabla some code to change db
//blbla check if success{
system('java someClientEmulatingExtension'); //run sfs extension to create an event
}
Making a cron-like script to see if there any changes is most inefficient...