title: how to pass authorization token in header in php
body: <p>i am trying to pass the authorization token in my php page.
  The code i am using is as below:</p>
  
  <pre><code>function getValues(){
  
      $path='webservice path';
  
      $ch = curl_init();
  
      curl_setopt($ch, CURLOPT_URL,$path);
  
      curl_setopt($ch, CURLOPT_FAILONERROR,1);
  
      curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1);
  
      curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
  
      curl_setopt($ch, CURLOPT_TIMEOUT, 60);
  
      curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Basic token_no'));
  
      curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: text/xml'));
  
      curl_setopt($ch, CURLOPT_HTTPHEADER, array('Access-Control-Allow-Origin: *'));
  
      $retValue = curl_exec($ch);
  
      $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
  
      curl_close($ch);
  
      return $retValue;
  
  }
  </code></pre>
  
  <p>but i am not able to include the header.
  Please help me out with this problem.</p>