Fix for Fatal error: Uncaught Error: Call to undefined function file_get_dom() simplehtmldom simple_html_dom

This error is caused due to a function name change in the simple_html_dom.php library if you are using an older one and upgrading to the never version, you can see it in the change log here:

Changed function name from "file_get_dom()" to "file_get_html()"

Just change your file_get_dom function to file_get_html and the issue should be fixed. 


// broken code
$html = file_get_dom($url);

// fixed code
$html = file_get_html($url);

Other Items in php
Page Views

This page has been viewed 199 times.

Search Code
Search Code by entering your search text above.

This is my test area for webdev. I keep a collection of code snippits here, mostly for my reference. Also if i find a good site, i usually add it here.


Random Quote
Most people can do absolutely awe-inspiring things,” he said. β€œSometimes they just need a little nudge.