title: Uncaught Error: Call to undefined function get_file_html()
body: <p>I am trying to parse this webpage which works fine when I include the CURL part code after the <code>include "simple_html_dom.php";</code> but if comment that part and only use simple_html_dom it gives me error saying </p>
  
  <p>Uncaught Error: Call to undefined function get_file_html() in filepath\index.php:18 Stack trace: #0 {main} thrown in  filepath\index.php</p>
  
  <p>Do I need curl if the file is not located locally?</p>
  
  <p>Sorry if this is a noob question I am just getting started with php.</p>
  
  <pre><code>&lt;?php
  
      include "simple_html_dom.php";
  
      $html = new simple_html_dom();
      $html = get_file_html('https://in.tradingview.com/symbols/NSE-TCS/');
  
      foreach($html-&gt;find('a') as $element)
         echo $element-&gt;href . " -&gt; " . $element-&gt;plaintext .'&lt;br&gt;'; 
  
  ?&gt;
  </code></pre>
  
  <p>CURL</p>
  
  <pre><code>/*  $ch = curl_init();
      curl_setopt($ch, CURLOPT_URL, "https://in.tradingview.com/symbols/NSE-TCS/");
  
      curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  
      $response = curl_exec($ch);
  
      curl_close($ch);
      //echo $response;*/
  </code></pre>
  
  <p>P.S. I have downloaded simple_html_dom.php from <a href="https://sourceforge.net/projects/simplehtmldom/" rel="nofollow noreferrer">here</a> and the file is there in root directory</p>