returnError('Could not request Maliki.', 404); $count=0; foreach($html->find('div.boite_strip') as $element) { if(!empty($element->find('a',0)->href) and $count < 20) { $item = new \Item(); $item->uri = 'http://www.maliki.com/'.$element->find('a',0)->href; $item->thumbnailUri = 'http://www.maliki.com/'.$element->find('img',0)->src; $item->title = $element->find('img',0)->title; $item->timestamp = strtotime(str_replace('/', '-', $element->find('span.stylepetit', 0)->innertext)); $item->content = ''; $this->items[] = $item; $count++; } } } public function getName(){ return 'Maliki'; } public function getURI(){ return 'http://www.maliki.com/'; } public function getCacheDuration(){ return 86400; // 24 hours } }