2018-05-29 11:28:22 +02:00
|
|
|
<?php
|
|
|
|
class ChristianDailyReporterBridge extends BridgeAbstract {
|
|
|
|
|
|
|
|
const MAINTAINER = 'rogerdc';
|
|
|
|
const NAME = 'Christian Daily Reporter Unofficial RSS';
|
|
|
|
const URI = 'https://www.christiandailyreporter.com/';
|
|
|
|
const DESCRIPTION = 'The Unofficial Christian Daily Reporter RSS';
|
|
|
|
// const CACHE_TIMEOUT = 86400; // 1 day
|
|
|
|
|
2018-10-26 18:07:34 +02:00
|
|
|
public function getIcon() {
|
|
|
|
return self::URI . 'images/cdrfavicon.png';
|
|
|
|
}
|
2018-05-29 11:28:22 +02:00
|
|
|
|
|
|
|
public function collectData() {
|
|
|
|
$uri = 'https://www.christiandailyreporter.com/';
|
|
|
|
|
|
|
|
$html = getSimpleHTMLDOM($uri)
|
|
|
|
or returnServerError('Could not request Christian Daily Reporter.');
|
|
|
|
foreach($html->find('div.top p a,div.column p a') as $element) {
|
|
|
|
$item = array();
|
|
|
|
// Title
|
|
|
|
$item['title'] = $element->innertext;
|
|
|
|
// URL
|
|
|
|
$item['uri'] = $element->href;
|
|
|
|
$this->items[] = $item;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|