I've a project that has a program written in C++ (that always has to run) and a Apache web server with PHP on a Windows PC. Now I want to send parameters retrieved from clients in PHP to the C++ program and get an answer back, but I can't figure out how to do it.
I've looked at exec() and shell_exec() in PHP, but they can only execute programs, I want to call a method in C++ and send the return value back to PHP.
Is the best way to temporary store the results in a file or do you have any better ideas?
Open a socket or use some other OS-provided interop mechanism. (I'd stick with TCP/IP sockets.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With