title: Adding custom HTTP header in call soap using PHP
body: <p>I'm trying to connect to a WebService SOAP.
  The service requires us to add a custom parameter in the HTTP header of the soap call</p>
  
  <pre><code>$context = array('http' =&gt;
      array(
          'header'  =&gt; "APIToken: $api_token\r\n"
      )
  );
  $soap_options = array(
      'stream_context' =&gt; stream_context_create($context),
      'encoding' =&gt; 'UTF-8',
      'exceptions' =&gt; TRUE,
      'trace' =&gt; true,
      'local_cert' =&gt; 'mycert.pem',
      'passphrase'=&gt;'xxx',
      'location'=&gt;$this-&gt;url_soap_dev
  );
  
  $soap_client = new SoapClient('soap.wsdl', $soap_options);
  
  $args = array(
      'param1' =&gt; $var,
      'param2' =&gt; 0,
      'optionalParameters'=&gt;array()
  );
  
  $ret = $soap_client-&gt;RemoteFunction(array('parameter'=&gt;$args));  
  </code></pre>
  
  <p>And this is my Request Headers:</p>
  
  <pre><code>POST /server/soap HTTP/1.1
  Host: domain.com
  Connection: Keep-Alive
  User-Agent: PHP-SOAP/5.2.6-1+lenny16
  Content-Type: text/xml; charset=utf-8
  SOAPAction: ""
  Content-Length: 400
  </code></pre>
  
  <p>Where can I add custom param ?</p>
  
  <p>Thx.</p>