getURI().'feed/'; $html = $this->getSimpleHTMLDOM($feed) or $this->returnServerError('Could not request '.$this->getName().': '.$feed); $limit = 0; foreach ($html->find('item') as $element) { if ($limit < 5) { $article_image = $element->find('image', 0)->plaintext; $article_url = ExtractFromDelimiters($element->innertext, '', ''); $article_summary = ExtractFromDelimiters($element->innertext, '', '

'); $article_html = $this->getContents($article_url) or $this->returnServerError('Could not request '.$this->getName().': '.$article_url); if (substr($article_html, 0, 2) == "\x1f\x8b") //http://www.gzip.org/zlib/rfc-gzip.html#header-trailer -> GZip ID1 $article_html = gzdecode($article_html); //Response is GZipped even if we didn't accept GZip!? Let's decompress... $article_html = str_get_html($article_html); //Now we have our HTML data. But still, that's an important HTTP violation... $article_content = $article_html->find('div.wlistingsingletext', 0)->innertext; $article_content = StripWithDelimiters($article_content, ''); $article_content = '

' .'

'.$article_summary.'

' .trim($article_content); $item = array(); $item['uri'] = $article_url; $item['title'] = $element->find('title', 0)->plaintext; $item['author'] = $article_html->find('a[rel=author]', 0)->plaintext; $item['timestamp'] = strtotime($element->find('pubDate', 0)->plaintext); $item['content'] = $article_content; $this->items[] = $item; $limit++; } } } }