title: PHP: How to scrape content of the website based on Javascript
body: <p>I'm trying to get content of this website using PHP simplehtmldom library.</p>
  
  <p><a href="http://www.immigration.govt.nz/migrant/stream/work/workingholiday/czechwhs.htm" rel="nofollow">http://www.immigration.govt.nz/migrant/stream/work/workingholiday/czechwhs.htm</a>"</p>
  
  <p>It is not working, so i tried using CURL:</p>
  
  <pre><code>function curl_get_file_contents($URL)
  {
      $c = curl_init();
      curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
      curl_setopt($c, CURLOPT_URL, $URL);
      $contents = curl_exec($c);
      curl_close($c);
  
      if ($contents) return $contents;
      else return FALSE;
  }
  </code></pre>
  
  <p>But always get only respose with some JS code and content:</p>
  
  <pre><code>&lt;noscript&gt;Please enable JavaScript to view the page content.&lt;/noscript&gt;
  </code></pre>
  
  <p>Is any possibility to solve this using PHP? I must use PHP in this case so i need to simulate JS based browser.</p>
  
  <p>Many thanks for any advice. </p>