If the following codes are executed under PHP5.6 environment, it will become an error ungiven a definition.
Composer is used.
<?php
require 'vendor/autoload.php';
// Create DOM from URL or file
$html = file_get_html('http://www.google.com/');
// Find all images
foreach($html->find('img') as $element)
echo $element->src . '<br>';
// Find all links
foreach($html->find('a') as $element)
echo $element->href . '<br>';
have you tried including simple-html-dom.php like this
require_once('simple_html_dom.php');
This project doesn't support Composer, so the autoloader feature doesn't work. @json-born is right, you should require the parser in order to use it in your project. Alternatively you can add the parser manually to your autoloader script: https://getcomposer.org/doc/01-basic-usage.md#autoloading