PHP Webserver integration to a locally running C++ exe? How do they interact?
<p>I'm not sure how it is being handled, so I wanted to ask it.</p>

<p>The new generation MMORPG games are trying to bridge their trading post (auction) systems on webserver, so the players can use it without any hassle even from their mobile phones.</p>

<p>The last example of it is Guild Wars 2. Basically, the system works like this:</p>

<pre><code>1. You login a locally running client.
2. Open up the auction house in game client. (like HTML frames in this case) 
3. The auction house connects to a webserver instead of sending packets to actual game server, like auctionhouse.guildwars2.com, which is also accessable via browser.
4. You want to sell your Sword, if the auction house successfully takes the Sword, it gets deleted from user inventory (client) and server, hence, client somehow gets informed by webserver reply.
</code></pre>

<p>So... I'm guessing...
How does the locally running client (a C++ application) knows if the item is sold or something failed? Does the webserver return a XML/JSON output for verification?</p>

<p>Like, webserver returns this;</p>

<pre><code>// XML reply 
&lt;auctionResponse&gt;
   &lt;itemId&gt;184818478A&lt;/itemId&gt;
   &lt;success&gt;Successful&lt;/success&gt;
   &lt;verifyKey&gt;AG8918ADHWDHA&lt;/verifyKey&gt;
&lt;/auctionResponse&gt;
</code></pre>

<p>and client checks it like;</p>

<pre><code>if(auctionHouse.auctionResponse == 'Successful')
{
     if(auctionHouse.auctionResponse == getVerifyKeyFromServer()) //so the server confirms
     {
           DeleteFromInventory(auctionHouse.itemId); //item will be removed from user inventory
     }
}
</code></pre>

<p>I've asked this to the developer of GW2 auction house, but he told me he can't share information about this.</p>

<p>So, basically, how does it work? The JSON/XML outputs by webserver or something entirely different to carry data?</p>

<p>Any help would be appreciated.</p>

<p>Ps. It is not a TCP connection. The auction house itself runs on port 80 and the backend is coded with a language like PHP. </p>
