clear(); unset ($html3); if ($img == '') return 'Daily comic not realease yet'; return ''; } $html = file_get_html('http://cdn2.cad-comic.com/rss.xml') or $this->returnError('Could not request CAD.', 404); $limit = 0; foreach($html->find('item') as $element) { if($limit < 5) { $item = new \Item(); $item->title = $element->find('title', 0)->innertext; $item->uri = CADUrl($element->find('description', 0)->innertext); if ($item->uri != 'notanurl') { $item->timestamp = strtotime($element->find('pubDate', 0)->plaintext); $item->content = CADExtractContent($item->uri); $this->items[] = $item; $limit++; } } } } public function getName(){ return 'CAD Bridge'; } public function getURI(){ return 'http://www.cad-comic.com/'; } public function getCacheDuration(){ return 3600*2; // 2 hours // return 0; } }