I have Apache server installed. I'm using Flot library to plot data in the browser.
The data is generated in other software written in C++.
I want the JavaScript to send command (when user press button in browser or automatically every 5 min) to the program and program must respond with large data.
How could i implement interaction between Apache server and C++ program?

PS: I know this can be done via environmental variables (Windows) but that not good solution for me.
Failed to Google good solution.