title: html dom Load() current page
body: <p>I have a php file with a function which checks for an <code>elementid</code>. I can check HTML strings, but I am at a loss on how to check the current page (preferably without explicitly defining it).</p>
  
  <pre><code>$doc = new DomDocument;
  $doc-&gt;validateOnParse = true;
  
  $doc-&gt;loadHTML($htmlstring); // ok
  $doc-&gt;Load(); // ?
  
  $doc-&gt;getElementById('div-id');
  </code></pre>