title: Fatal error: Call to undefined method DOMDocument::getElementsById()
body: <p>I'm parsing a exterior html (<a href="https://rads.stackoverflow.com/amzn/click/com/B00D78PZE8" rel="nofollow noreferrer" rel="nofollow noreferrer">http://www.amazon.com/Toshiba-Satellite-C55-A5245-15-6-Inch-Horizon/dp/B00D78PZE8/ref=lp_9277875011_1_1?s=pc&amp;ie=UTF8&amp;qid=1400886357&amp;sr=1-1</a>) where I have a element like this: </p>
  
  <p><code>&lt;span id="priceblock_ourprice" class="a-size-medium a-color-price"&gt;$429.99&lt;/span&gt;</code></p>
  
  <p>and a php with the following code:</p>
  
  <pre><code>$dom = new DOMDocument;
  
  libxml_use_internal_errors(TRUE);
  $dom-&gt;loadHTMLFile($url);
  libxml_clear_errors();
  
  $links = $dom-&gt;getElementsById('priceblock_ourprice');
  
  foreach ($links as $link ) {
      echo "- ".$link-&gt;nodeValue."&lt;br&gt;";
  }
  </code></pre>
  
  <p>But I'm getting the following error:</p>
  
  <pre><code>Fatal error: Call to undefined method DOMDocument::getElementsById() 
  </code></pre>
  
  <p>Anyone could tell me what I'm doing wrong?</p>
  
  <p>Thanks!</p>