title: Get Content of Remote HTML page
body: <p>I'm using the example of this post <a href="https://stackoverflow.com/questions/11733876/how-to-get-content-ot-remote-html-page">How to get content from another page</a> but I need to get just "SUPERMAN" from website with this format:</p>
  
  <pre><code>&lt;td headers="superHero"&gt;SUPERMAN&lt;/td&gt;
  &lt;td headers="country"&gt;USA&lt;/td&gt;
  </code></pre>
  
  <p>the code:</p>
  
  <pre><code>$url = "http://www.otherweb.com";
  $curl = curl_init($url);
  curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
  $output = curl_exec($curl);
  curl_close($curl);
  
  
  $DOM = new DOMDocument;
  $DOM-&gt;loadHTML( $output);
  
  //get all td
  //$items = $DOM-&gt;getElementsByTagName('td'); 
  $items = $DOM-&gt;getElementsByID('superHero');
  
  //display all text
   for ($i = 0; $i &lt; $items-&gt;length; $i++)
   echo $items-&gt;item($i)-&gt;nodeValue . "&lt;br/&gt;";
  </code></pre>
  
  <p>Thanks!!!</p>