// this may raise parse errors as some html may be a component..
@$dom->loadHTML('<?xml encoding="UTF-8">' .$html);
$imgs= $dom->getElementsByTagName('img');
-
+ print_r($imgs);exit;
foreach ($imgs as $i=>$img) {
$url = $img->getAttribute('src');
if (preg_match('#^cid:#', $url)) {