diff --git a/inc/FeedParser.php b/inc/FeedParser.php new file mode 100644 index 0000000000000000000000000000000000000000..f2aeb4e7bebc7b12a85649d8a4443baff655a880 --- /dev/null +++ b/inc/FeedParser.php @@ -0,0 +1,33 @@ +<?php +/** + * Class used to parse RSS and ATOM feeds + * + * @author Andreas Gohr <andi@splitbrain.org> + */ + +if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../').'/'); +require_once(DOKU_INC.'inc/HTTPClient.php'); +require_once(DOKU_INC.'inc/SimplePie.php'); + + +/** + * We override some methods of the original SimplePie class here + */ +class FeedParser extends SimplePie { + + /** + * Constructor. Set some defaults + */ + function FeedParser(){ + $this->SimplePie(); + $this->caching = false; + } + + /** + * Fetch an URL using our own HTTPClient + */ + function getFile($url){ + $http = new DokuHTTPClient(); + return $http->get($url); + } +}