title: loadHTMLFile loads, but is empty? PHP
body: <p>so I tried to get a fix for this earlier but I think we were all going in the wrong direction. I'm trying to check two servers to make sure that at least one of them are active to make a call to. The service provides me with a page for each that simply has "OK" under a div with id="server_status". When I try to loadHTMLFile into a variable, it returns true, but I can never pull the element I need from it. After doing some output testing with saveHTML(), it appears that the variable holding the DOMDocument is empty. Here's my code:</p>
  
  <pre><code>servers = array('tpeweb.paybox.com', // primary URL
          'tpeweb1.paybox.com'); // backup URL
      foreach($servers as $server){
  
          $doc = new DOMDocument();
          $doc-&gt;validateOnParse = true;
          $doc-&gt;loadHTMLFile('https://'.$server.'/load.html');
          $server_status = "";
          $docText = $doc-&gt;saveHTML();
          if($doc) {
              echo "HTML should output here: ";
              echo $docText;
          }
          if(!$doc) {
              echo "HTML file not loaded";
          }
  
          $element = $doc-&gt;getElementById('server_status');
  
          if($element){
              $server_status = $element-&gt;textContent;
          }
          if($server_status == "OK"){
              // Server is up and services are available
              return array(true, 'https://'.$server.'/cgi/MYchoix_pagepaiement.cgi');
          }
      }
      return array(false, 'e404.html');
  </code></pre>
  
  <p>All I get as output is "HTML should output here: " twice, and then it returns the array at the bottom. This is the code that they provided:</p>
  
  <pre><code>$servers = array('tpeweb.paybox.com', // primary URL
          'tpeweb1.paybox.com'); // backup URL
  $serverOK = "";
  foreach($servers as $server){
      $doc = new DOMDocument();
      $doc-&gt;loadHTMLFile('https://'.$server.'/load.html');
      $server_status = "";
      $element = $doc-&gt;getElementById('server_status');
      if($element){
          $server_status = $element-&gt;textContent;
      }
      if($server_status == "OK"){
          // Server is up and services are available
          $serverOK = $server;
          break;
      }
      // else : Server is up but services are not available .
  }
  if(!$serverOK){
      die("Error : no server found");
  }
  
  echo 'Connecting to https://'.$server.'/cgi/MYchoix_pagepaiement.cgi';
  </code></pre>
  
  <p>This also seems to be having the same problem. Could it be something with my PHP configuration? I'm on version 5.3.6. </p>
  
  <p>Thanks,
  Adrian</p>
  
  <p>EDIT: 
  I tried it by inputting the HTML as a string instead of calling it to the server and it worked fine. However, calling the HTML into a string to use in the PHP function results in the same issue. Fixes??</p>