2 class Af_ElReg extends Plugin {
8 "Fetch content of The Register feeds",
12 function init($host) {
15 $host->add_hook($host::HOOK_ARTICLE_FILTER, $this);
18 function hook_article_filter($article) {
19 if (strpos($article["link"], "theregister.co.uk") !== FALSE) {
21 $doc = new DOMDocument();
22 @$doc->loadHTML(fetch_file_contents($article["link"]));
27 $basenode = $doc->getElementById("body");
30 $article["content"] = $doc->saveXML($basenode);
38 function api_version() {