debug = false; // convert links to footnotes? $readability->convertLinksToFootnotes = true; // process it $result = $readability->init(); // does it look like we found what we wanted? if ($result) { echo "== Title =====================================\n"; echo $readability->getTitle()->textContent, "\n\n"; echo "== Body ======================================\n"; $content = $readability->getContent()->innerHTML; // if we've got Tidy, let's clean it up for output if (function_exists('tidy_parse_string')) { $tidy = tidy_parse_string($content, array('indent'=>true, 'show-body-only' => true), 'UTF8'); $tidy->cleanRepair(); $content = $tidy->value; } echo $content; } else { echo 'Looks like we couldn\'t find the content. :('; } ?>