emulate XMLHttpRequest client using PHP
<p>For testing where should i give the url of the site, can you show me with the example in the above code?</p>

<p>

<pre><code>$r = new HTTPRequest("server.php", HTTP_METH_POST);
$r-&gt;addPostFields(array('omg' =&gt; 'wtf'));
$r-&gt;send();
var_dump($r-&gt;getResponseCode());
var_dump($r-&gt;getResponseBody());
</code></pre>
