diff --git a/bridges/CADBridge.php b/bridges/CADBridge.php new file mode 100644 index 0000000..fd7c644 --- /dev/null +++ b/bridges/CADBridge.php @@ -0,0 +1,61 @@ +returnError('Could not request CAD.', 404); + $limit = 0; + foreach($html->find('item') as $element) { + if($limit < 3) { + $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 = ''; + $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; + } +}