title: Connect to a MySQL database from C++ Through PHP
body: <p>I have a dedicated Linux Server with my multiplayer game (C++/Sockets) on it and recently I acquired a MySQL server "service" for my web pages (I also have a little multiplayer game done in PHP) so I don't need to think about backups etc.</p>
  
  <p>The MySQL service works wonderfully well for my web pages but I can't connect from the server to the database as they are not on the same internal networks.
  The only connections that can be done must come from web pages hosted on the providers servers.</p>
  
  <p>I have thought of sending requests from the server (the C++ game server) to a PHP web page that connects to the database and sends back the answer.
  This will work for any simples request (like how many HP has player X) but when it comes to iterative requests (ie. "SELECT id FROM player") where there are a lot of answers it becomes more complicated.</p>
  
  <p>Is there a standard way to circumvent this? Is there already proof read PHP / C++ code somewhere out there? Any other way (ie some sort of fake port forwarding)?</p>
  
  <p>Or should I bite the sour apple and start fiddling with Linux automated backups?</p>
  
  <p>In this case, speed is not an issue, data integrity and reliability is.</p>