Use xpath to seek into a valid xhtml webpage and grab an html fragment
query($xpath); if($nodes->length > 0) { $thisNode = $nodes->item(0); $dom->formatOutput = TRUE; $xhtmlFragment = $dom->saveXML($thisNode); $content = ''.htmlentities($xhtmlFragment).''; } else { $content = 'no matching block: '.$xpath; } } else { // default $site = 'http://dev.frankdanielson.com'; //'http://theflop.net/en/'; $xpath = '//div[@id=\'mainBody\']'; //'//div[@id=\'centercontent\''; $content = 'click get block to display it here'; } ?>