So im trying to show a snapshot html from a page using DOMDocument. What i have so far is my home page which i load from a remote location
$dom = new DOMDoc
I think what you need to do is create a document fragment:
$div = $dom->createElement( 'div'); // No $contents here $fragment = $dom->createDocumentFragment(); $fragment->appendXML( $content); $div->appendChild( $fragment);