title: PHP get_headers() alternative
body: <p>I need a  PHP script that reads the HTTP response code for each URL request. </p>
  
  <p>something like </p>
  
  <pre><code>$headers = get_headers($theURL);
  return substr($headers[0], 9, 3);
  </code></pre>
  
  <p>The problem is the get_headers() function is disabled at server level, as a policy.So it doesn't work. </p>
  
  <p>The question is how to get the HTTP response code for a URL?   </p>