26 private $external =
true;
35 $GLOBALS[
'egotec_conf'][
'proxy'][
'proxy_host']
36 && $GLOBALS[
'egotec_conf'][
'proxy'][
'proxy_port']
40 $tmp = $GLOBALS[
'egotec_conf'][
'tmp_dir'].
'RSS'.md5(microtime()).
'.rss';
41 file_put_contents($tmp, $content);
43 $this->external =
false;
54 if (!$this->external) {
65 public function read($max = 0) {
66 require_once(
'SimplePie/autoloader.php');
69 if (!empty($this->url)) {
70 $feed =
new SimplePie();
71 $feed->set_feed_url($this->url);
72 $feed->enable_cache(
false);
74 $feed->handle_content_type();
76 foreach ($feed->get_items() as $item) {
77 if (!$max ||
sizeof($content) < $max) {
79 'link' => $item->get_permalink(),
80 'title' => $item->get_title(),
81 'description' => $item->get_description(),
82 'date' => $item->get_date(
'Y-m-d H:i:s')
static file_get_contents($filename, $utf8=true, $context=null)