Since you are already running a LAMP server, I would write the data to your MySQL database, where it can be read via PHP and displayed.
The MySQL website has example code for writing to a MySQL database from C++.
This has one big advantage over a RAM disk or tmpfs it persists the data across restarts, allowing for long term storage and analysis.