I am trying to learn HTML DOM parsing at my localhost. But I crash right in the beggining.
I have made a new project
I have downloaded files from simplehtmldom.sourceforge.net
I have put this code inside my HTML project
I get this error, when I run the script:
Fatal error: Uncaught Error: Call to undefined function file_get_html() in C:\xampp\htdocs\PhpProject1\index.php:15 Stack trace: #0 {main} thrown in C:\xampp\htdocs\PhpProject1\index.php on line 15
Am I misunderstanding something here?
I think PHP DOM Parser Library No Longer Support to PHP latest Version so, You Need to Use cURL for that It will help you.
<?php
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "http://www.google.co.in");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($curl);
curl_close($curl);
print $result;
?>
Try this..!