find('div[style=text-align:justify]') as $e) { $text = $e->outertext; } $html2->clear(); unset ($html2); // Replace all relative urls with absolute ones $text = preg_replace('/(href|src)(\=[\"\'])(?!http)([^"\']+)/ims', "$1$2" . self::URI . "$3", $text); $text = strip_tags($text, '