include("/var/www/qmp.cat/include/thirdparty/simple_html_dom.php");
// MANUAL: http://simplehtmldom.sourceforge.net/manual.htm
$url = "http://dev.qmp.cat";
$html = file_get_html($url."/projects/qmp/documents");
// To Remove
$html->find("h2",1)->outertext="";
$html->find("div[id=add-document]",0)->outertext="";
// Replace with right URL
foreach($html->find("a") as $a) {
$a->href = $url.$a->href;
$a->target="_blank";
}
// Replace sections and add anchors
$html->find("h3",1)->innertext="User documentation";
$html->find("h3",2)->innertext="Technical documentation";
// PRINT ALL ("content" div only)
//echo $html;
echo $html->find("div[id=content]",0);
echo " ";