title: file_get_contents script works with some websites but not others
body: <p>I'm looking to build a PHP script that parses HTML for particular tags.  I've been using this code block, adapted from this <a href="http://www.oooff.com/php-scripts/basic-php-scraped-data-parsing/basic-php-data-parsing.php" rel="nofollow noreferrer">tutorial</a>:</p>
  
  <pre><code>&lt;?php 
  $data = file_get_contents('http://www.google.com');
  $regex = '/&lt;title&gt;(.+?)&lt;/';
  preg_match($regex,$data,$match);
  var_dump($match); 
  echo $match[1];
  ?&gt;
  </code></pre>
  
  <p>The script works with some websites (like google, above), but when I try it with other websites (like, say, freshdirect), I get this error:</p>
  
  <p>"Warning: file_get_contents(<a href="http://www.freshdirect.com" rel="nofollow noreferrer">http://www.freshdirect.com</a>) [function.file-get-contents]: failed to open stream: HTTP request failed!"</p>
  
  <p>I've seen a bunch of great <a href="https://stackoverflow.com/questions/4836566/unresolved-warning-message-when-running-php-script-file-get-contents-unable-t">suggestions</a> on StackOverflow, for example to enable <code>extension=php_openssl.dll</code> in php.ini.  But (1) my version of php.ini didn't have <code>extension=php_openssl.dll</code> in it, and (2) when I added it to the extensions section and restarted the WAMP server, per this <a href="http://www.leoganda.net/how-to-enable-xampp-ssl-socket-transport/" rel="nofollow noreferrer">thread</a>, still no success.  </p>
  
  <p>Would someone mind pointing me in the right direction?  Thank you very much! </p>