title: PHP Simple HTML DOM Parser can't find elements after using str_get_html();
body: <p>I am using PHP Simple HTML DOM Parser to gather some text from another website. When I use file_get_html($url) then I get the error, "Message: file_get_contents(<a href="http://www.yellowbook.com/profile/great-wall-restaurant_1855353442.html" rel="nofollow">http://www.yellowbook.com/profile/great-wall-restaurant_1855353442.html</a>): failed to open stream: HTTP request failed! HTTP/1.1 416 Requested Range Not Satisfiable"</p>
  
  <p>So I can use str_get_html($url) and I get a return but I can't find any elements afterward. Here is my code:</p>
  
  <pre><code>$data['yb_data_reviews'] = ''; 
      $yb_reviews[] = '';
      $yb_url = 'http://www.yellowbook.com/profile/great-wall-restaurant_1855353442.html';
      if($yb_url){
          $yb_dom = str_get_html($yb_url);
          foreach($yb_dom-&gt;find('div.detailItem') as $yb_review) {
              $item['author'] = $yb_review;
              $yb_reviews[] = $item;
          }
          $data['yb_data_reviews'] = $yb_reviews;
      }
      print_r($data['yb_data_reviews']);
  </code></pre>
  
  <p>My return is blank. If I just return $yb_dom then I get:</p>
  
  <pre><code>simple_html_dom Object ( [root] =&gt; simple_html_dom_node Object ( [nodetype] =&gt; 5 [tag] =&gt; root [attr] =&gt; Array ( ) [children] =&gt; Array ( ) [nodes] =&gt; Array ( [0] =&gt; simple_html_dom_node Object ( [nodetype] =&gt; 3 [tag] =&gt; text [attr] =&gt; Array ( ) [children] =&gt; Array ( ) [nodes] =&gt; Array ( ) [parent] =&gt; simple_html_dom_node Object *RECURSION* [_] =&gt; Array ( [4] =&gt; http://www.yellowbook.com/profile/great-wall-restaurant_1855353442.html ) [tag_start] =&gt; 0 [dom:simple_html_dom_node:private] =&gt; simple_html_dom Object *RECURSION* ) ) [parent] =&gt; [_] =&gt; Array ( [0] =&gt; -1 [1] =&gt; 2 ) [tag_start] =&gt; 0 [dom:simple_html_dom_node:private] =&gt; simple_html_dom Object *RECURSION* ) [nodes] =&gt; Array ( [0] =&gt; simple_html_dom_node Object ( [nodetype] =&gt; 5 [tag] =&gt; root [attr] =&gt; Array ( ) [children] =&gt; Array ( ) [nodes] =&gt; Array ( [0] =&gt; simple_html_dom_node Object ( [nodetype] =&gt; 3 [tag] =&gt; text [attr] =&gt; Array ( ) [children] =&gt; Array ( ) [nodes] =&gt; Array ( ) [parent] =&gt; simple_html_dom_node Object *RECURSION* [_] =&gt; Array ( [4] =&gt; http://www.yellowbook.com/profile/great-wall-restaurant_1855353442.html ) [tag_start] =&gt; 0 [dom:simple_html_dom_node:private] =&gt; simple_html_dom Object *RECURSION* ) ) [parent] =&gt; [_] =&gt; Array ( [0] =&gt; -1 [1] =&gt; 2 ) [tag_start] =&gt; 0 [dom:simple_html_dom_node:private] =&gt; simple_html_dom Object *RECURSION* ) [1] =&gt; simple_html_dom_node Object ( [nodetype] =&gt; 3 [tag] =&gt; text [attr] =&gt; Array ( ) [children] =&gt; Array ( ) [nodes] =&gt; Array ( ) [parent] =&gt; simple_html_dom_node Object ( [nodetype] =&gt; 5 [tag] =&gt; root [attr] =&gt; Array ( ) [children] =&gt; Array ( ) [nodes] =&gt; Array ( [0] =&gt; simple_html_dom_node Object *RECURSION* ) [parent] =&gt; [_] =&gt; Array ( [0] =&gt; -1 [1] =&gt; 2 ) [tag_start] =&gt; 0 [dom:simple_html_dom_node:private] =&gt; simple_html_dom Object *RECURSION* ) [_] =&gt; Array ( [4] =&gt; http://www.yellowbook.com/profile/great-wall-restaurant_1855353442.html ) [tag_start] =&gt; 0 [dom:simple_html_dom_node:private] =&gt; simple_html_dom Object *RECURSION* ) ) [callback] =&gt; [lowercase] =&gt; 1 [original_size] =&gt; 71 [size] =&gt; 71 [pos:protected] =&gt; 71 [doc:protected] =&gt; http://www.yellowbook.com/profile/great-wall-restaurant_1855353442.html [char:protected] =&gt; [cursor:protected] =&gt; 2 [parent:protected] =&gt; simple_html_dom_node Object ( [nodetype] =&gt; 5 [tag] =&gt; root [attr] =&gt; Array ( ) [children] =&gt; Array ( ) [nodes] =&gt; Array ( [0] =&gt; simple_html_dom_node Object ( [nodetype] =&gt; 3 [tag] =&gt; text [attr] =&gt; Array ( ) [children] =&gt; Array ( ) [nodes] =&gt; Array ( ) [parent] =&gt; simple_html_dom_node Object *RECURSION* [_] =&gt; Array ( [4] =&gt; http://www.yellowbook.com/profile/great-wall-restaurant_1855353442.html ) [tag_start] =&gt; 0 [dom:simple_html_dom_node:private] =&gt; simple_html_dom Object *RECURSION* ) ) [parent] =&gt; [_] =&gt; Array ( [0] =&gt; -1 [1] =&gt; 2 ) [tag_start] =&gt; 0 [dom:simple_html_dom_node:private] =&gt; simple_html_dom Object *RECURSION* ) [noise:protected] =&gt; Array ( ) [token_blank:protected] =&gt; [token_equal:protected] =&gt; =/&gt; [token_slash:protected] =&gt; /&gt; [token_attr:protected] =&gt; &gt; [_charset] =&gt; UTF-8 [_target_charset] =&gt; UTF-8 [default_br_text:protected] =&gt; [default_span_text] =&gt; [self_closing_tags:protected] =&gt; Array ( [img] =&gt; 1 [br] =&gt; 1 [input] =&gt; 1 [meta] =&gt; 1 [link] =&gt; 1 [hr] =&gt; 1 [base] =&gt; 1 [embed] =&gt; 1 [spacer] =&gt; 1 ) [block_tags:protected] =&gt; Array ( [root] =&gt; 1 [body] =&gt; 1 [form] =&gt; 1 [div] =&gt; 1 [span] =&gt; 1 [table] =&gt; 1 ) [optional_closing_tags:protected] =&gt; Array ( [tr] =&gt; Array ( [tr] =&gt; 1 [td] =&gt; 1 [th] =&gt; 1 ) [th] =&gt; Array ( [th] =&gt; 1 ) [td] =&gt; Array ( [td] =&gt; 1 ) [li] =&gt; Array ( [li] =&gt; 1 ) [dt] =&gt; Array ( [dt] =&gt; 1 [dd] =&gt; 1 ) [dd] =&gt; Array ( [dd] =&gt; 1 [dt] =&gt; 1 ) [dl] =&gt; Array ( [dd] =&gt; 1 [dt] =&gt; 1 ) [p] =&gt; Array ( [p] =&gt; 1 ) [nobr] =&gt; Array ( [nobr] =&gt; 1 ) [b] =&gt; Array ( [b] =&gt; 1 ) [option] =&gt; Array ( [option] =&gt; 1 ) ) )
  </code></pre>
  
  <p>What am I doing wrong that I can't return any elements using str_get_html()? Any help is appreciated. Thanks.</p>