loadHTML($page); $title = $doc->getElementsByTagName('title')[0]->textContent; ?>
' . $site . ''; echo ' [orig]
'; $content = $doc->getElementsBytagName('div'); foreach ($content as $el) { if (stripos($el->getAttribute('class'), 'body') !== false) { $ret = new DOMDocument(); $node = $ret->importNode($el, true); $ret->appendChild($node); echo $ret->saveHTML(); // echo $el->nodeValue; // echo '