How do you use PHP to interact with a running C++ process?
<p>Is it possible to have a C++ program running on a server that sits and waits to be passed arguments by a PHP process. 
The C++ program would then process these arguments and return a result to PHP.</p>

<p>I’ve been searching the web and can see a couple of ways to run a C++ program from PHP but can’t find a way to interact with a C++ program that is already running.</p>

<p>The sort of C++ programs I’m thinking of are ones that might take time to set up e.g. They create a big data structure of some kind and so I don’t want to run them every time I need them. I want the C++ programs to create their data structures and then sit back and wait until asked by PHP for information from that data structure.</p>

<p>Thanks</p>
