Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions libraries/RSSParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class RSSParser {
var $cache_dir = './application/cache/'; // Cache directory
var $write_cache_flag = FALSE; // Flag to write to cache - defaulted to false
var $callback = FALSE; // Callback to read custom data
public $isSecure = FALSE;

function RSSParser($callback = FALSE)
{
Expand Down Expand Up @@ -156,7 +157,13 @@ function parse()
}

flock($fp, LOCK_EX);
fwrite($fp, $rawFeed);
if($this->isSecure){
fwrite($fp, str_replace("http://", "https://", $rawFeed));
}
else{
fwrite($fp, $rawFeed);
}

flock($fp, LOCK_UN);
fclose($fp);
}
Expand All @@ -179,6 +186,14 @@ function set_feed_url($url = NULL)
}

// --------------------------------------------------------------------

function set_secure_content($isSecure = FALSE)
{
$this->isSecure = $isSecure;
return $this;
}
// --------------------------------------------------------------------


/* Return the feeds one at a time: when there are no more feeds return false
* @param No of items to return from the feed
Expand Down Expand Up @@ -248,4 +263,4 @@ function clear()
}

/* End of file RSSParser.php */
/* Location: ./application/libraries/RSSParser.php */
/* Location: ./application/libraries/RSSParser.php */