File: FeedParser.php

package info (click to toggle)
dokuwiki 0.0.20061106-6
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 9,600 kB
  • ctags: 6,733
  • sloc: php: 52,011; perl: 203; sh: 184; makefile: 51
file content (35 lines) | stat: -rw-r--r-- 761 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?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
     *
     * Overrides SimplePie's own method
     */
    function get_file($url){
        $http = new DokuHTTPClient();
        return $http->get($url,true);
    }
}