why POST method is not working?
<p>I have do post some information in cross domain . And i am achieving this thing by below code</p>

<pre><code>&lt;?php

  function do_post_request($sendingurl, $data, $optional_headers = null) {

    $params = array(
      'http' =&gt; array(
        'method' =&gt; 'POST',
        'url' =&gt; $data
      )
    );
    if ($optional_headers !== null) {
      $params['http']['header'] = $optional_headers;
    }
    $ctx = stream_context_create($params);

    $fp = @fopen($sendingurl, 'rb', false, $ctx);
    if (!$fp) {
      throw new Exception("Problem with $sendingurl, $php_errormsg");
    }

    $response = @stream_get_contents($fp);
    if ($response === false) {
      throw new Exception("Problem reading data from $sendingurl, $php_errormsg");
    }

    return $response;

  }

  $response = do_post_request('http://mag16.playtrickz.com/testing.php','http%3A%2F%2Fwww.facebook.com');
  echo $response;
</code></pre>

<p>But it is not working . 
On successful POST Request : It will display its value 
otherwise it will show : <strong>nodata found</strong>.
Why it is not working and how to make them work . </p>
