Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

file_get_html displays Fatal Error Call to undefined function

Tags:

php

I used the following code to parse the HTML of another site but it display the fatal error:

$html=file_get_html('http://www.google.co.in');

Fatal error: Call to undefined function file_get_html()

like image 697
Sathish Kumar Avatar asked Aug 19 '11 16:08

Sathish Kumar


2 Answers

are you sure you have downloaded and included php simple html dom parser ?

like image 156
mkk Avatar answered Nov 19 '22 08:11

mkk


You are calling class does not belong to php.

Download simple_html_dom class here and use the methods included as you like it. It is really great especially when you are working with Emails-newsletter:

include_once('simple_html_dom.php');
$html = file_get_html('http://www.google.co.in');
like image 10
khaled Avatar answered Nov 19 '22 10:11

khaled