Skip to content Skip to sidebar Skip to footer

Parsing (invalid) HTML From Other Website Using PHP

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);

Solution 1:

You can attempt to parse it after turning off strict error checking:

$dom = new DOMDocument;
$dom->strictErrorChecking = FALSE;
$dom->loadHTML($tidy);

Post a Comment for "Parsing (invalid) HTML From Other Website Using PHP"