title: How to send data in http headers in php for calling another server Api
body: <p>I have to call third party API which I need to send data in headers  I am trying in cURL.</p>
  
  <p>Is there any method to send data without curl on third party server which receiving on headers parameters.</p>
  
  <p>This is what am trying but not succeed:</p>
  
  <pre><code>$MobileNo=$_POST['MobileNo'];
  $SMSText=$_POST['SMSText'];
  
  $remarks=$_POST['remarks'];
  $RequestNo=$_POST['RequestNo'];
  $headers = array
  (
      'MobileNo', $MobileNo,
      'RequestNo', $RequestNo,
      'SMSText', $SMSText,
      'Content-Type: application/text'
  );
  
  $ch = curl_init();
  curl_setopt( $ch,CURLOPT_URL, 'http://example.com/api/SendEnglishSMS' );
  curl_setopt( $ch,CURLOPT_POST, true );
  curl_setopt( $ch,CURLOPT_HTTPHEADER, $headers );
  curl_setopt( $ch,CURLOPT_RETURNTRANSFER, true );
  curl_setopt( $ch,CURLOPT_SSL_VERIFYPEER, false );
  $result = curl_exec($ch );
  curl_close( $ch );
  echo $result;
  </code></pre>
  
  <p>I want to send data as well as receive the response from the third server request.</p>