title: How to read CURL POST on remote server?
body: <p>This is my <code>cURL</code> <code>POST</code> function:</p>
  
  <pre><code>public function curlPost($url, $data)
  {
      $fields = '';
  
      foreach($data as $key =&gt; $value) { 
        $fields .= $key . '=' . $value . '&amp;'; 
      }
  
      rtrim($fields, '&amp;');
  
      $ch = curl_init();
  
      curl_setopt($ch, CURLOPT_URL, $url);
      curl_setopt($ch, CURLOPT_POST, count($data));
      curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
  
      $result = curl_exec($ch);
      $info   = curl_getinfo($ch);
  
      curl_close($ch);
  }
  
  $this-&gt;curlPost('remoteServer', array(data));
  </code></pre>
  
  <p>How do I read the <code>POST</code> on the remote server?</p>
  
  <p>The remote server is using PHP... but what var in <code>$_POST[]</code> should I read</p>
  
  <p>for e.g:- <code>$_POST['fields']</code> or <code>$_POST['result']</code></p>