title: Add header Access-Control-Allow-Origin to XMLHttpResponse in php
body: <p>I am sending XHR request to server written in php which is working fine.
  but at some cross domain origin are not allowing loading and processing the response from server. it is throwing error </p>
  
  <pre><code>XMLHttpRequest cannot load http://mydomain/getInfo?blabla. Origin http://www.somedomain.com is not allowed by Access-Control-Allow-Origin.
  </code></pre>
  
  <p>so how can I set Access-Control-Allow-Origin in the response headers in php?</p>