title: Get a Dom element from website using php
body: <p>Hello guys I want to get an HTML node from website to show it in my website, but I can't do it.</p>
  
  <h2>This is my code.</h2>
  
  <pre><code>$html = htmlentities(file_get_contents("http://stackoverflow.com/"));
  $doc = new DOMDocument();
  $doc-&gt;loadHTML($html);
  $h1 = $doc-&gt;getElementsByTagName("title");
  var_dump($h1);
  </code></pre>
  
  <h2>And this is the result.</h2>
  
  <pre><code>object(DOMNodeList)#2 (1) {
    ["length"]=&gt;
    int(0)
  }
  </code></pre>
  
  <p>Please help.
  Thanks in advance.</p>