Using PHP and C++ for data exchange?
<p>Is it possible to send data from C++ to PHP? I have wrote a server in C++ that connects to a database, and I was wondering if it is possible at all to use the socket library built into PHP to connect to the socket server written in C++. Would it just be PHP itself? I mean, would I not use JavaScript (AJAX) to call a PHP script that might do the socket work?</p>

<p>Basically, how do Google do this? I know some of their applications use C++/Java as their back-end, but is there any performance at all?</p>

<p>For those wondering why I am asking this question, then the answer is I don't want to rely on PHP to handle data as I am writing a game. I would like PHP to handle the web part, but not necessarily the game client so-to-speak; and I just think C++ would be a lot efficient at sending and receiving data to store in the database.</p>

<p>Has anyone done something like this and if so did you run into problems; and is this a practical solution at all?</p>

<p>Thanks.</p>
