If you want to make remote procedure calls from your site, I would recommend looking at SOAP. SOAP works fine with PHP , and with gSOAP you can easily insert the server interface into your C ++ application or vice versa if necessary.
If you have only very simple messages for the application, your database idea will also work, but your application will need to continue to check for a new message (which means a lot of unnecessary traffic if your database is not on the same computer as your application), and you will have to deal with these checks yourself, come up with models, etc.
SOAP, on the other hand, sends your data directly to your server application and implicitly processes all unpleasant things, such as type safety or serialization.
You can find a lot of documentation and examples, carefully explaining how SOAP is determined and how it works from the World Wide Web Consortium . There are also various examples of how to configure your SOAP server in C ++ in the gSOAP User Guide .
source share