// Read the XML file for processing. $cache_filename = $this->cache_location . '/' . urlencode($this->rss_url) . '.spc'; if ($this->caching && !$this->xml_dump && substr($this->rss_url, 0, 7) == 'http://' && file_exists($cache_filename)) { if ($fp = fopen($cache_filename, 'r')) { $data = ''; while (!feof($fp)) { $data .= fread($fp, 2048); } fclose($fp); $mp_rss = unserialize($data); if (empty($mp_rss)) { $this->caching = false; return $this->init(); } elseif (isset($mp_rss['feed_url'])) { $this->rss_url = $mp_rss['feed_url']; return $this->init(); } else { $this->data = $mp_rss; return true; } } else { $this->caching = false; return $this->init(); }