I’m trying to parse the following HTML from the following URL:
http://md5.rednoize.com/?q=fbade9e36a3f36d3d676c1b808451dd7
The code:
$html = file_get_contents($url.$hash);
$config = array(
'clean' => 'yes',
'output-html' => 'yes',
);
$tidy = tidy_parse_string($html, $config, 'utf8');
$tidy->cleanRepair();
$dom = new DOMDocument;
$dom->loadHTML($tidy);
$result = $dom->getElementById('result');
However it is invalid:
Warning: DOMDocument::loadHTML() [<a href='domdocument.loadhtml'>domdocument.loadhtml</a>]: ID switcher already defined in Entity, line: 128 in
Is there a way to still be able to parse it?
You can attempt to parse it after turning off strict error checking: