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: https://sourceforge.net/projects/simplehtmldom/files/simplehtmldom/1.9.1/

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. 

PHP

// 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 61 times.

Search Code
Search Code by entering your search text above.
Welcome

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.
Unknown