Jump to content

Archived

This topic is now archived and is closed to further replies.

chrziz

Magpie RSS Help

Recommended Posts

I am using [a href=\"http://magpierss.sourceforge.net/\" target=\"_blank\"]Magpie RSS[/a] to read an rss feed and by default it uses a feed caching system that so it only grabs the feed once an hour (or whatever time you specifty). It also has a constant that you can define to disable caching:

[code]
* CONSTANTS - redefine these in your script to change the
* behaviour of fetch_rss() currently, most options effect the cache
*
* MAGPIE_CACHE_ON - Should Magpie cache parsed RSS objects?
* For me a built in cache was essential to creating a "PHP-like"
* feel to Magpie, see rss_cache.inc for rationale
[/code]

Here's the [a href=\"http://chrziz.com/rss_cache.txt\" target=\"_blank\"]rss_cache.inc[/a] it says to refer to.

I am fairly new to php and I am trying to turn the caching off, but just for a specified script so it grabs new info every time the script is executed and not pull the cached old data.

This is what i was trying to do:
[code]
include_once('/rss/magrss/rss_fetch.inc');

define("MAGPIE_CACHE_ON", false);

$rss = fetch_rss("http://gmail.google.com/gmail/feed/atom/");

foreach ($rss->items as $item ) {
    $count++;
}

if ($count > 0) {
    $message = "$count new messages";
} else {
    $message = "No new messages.";
}

[/code]

It doesn't work and just grabs the cached page, Can someone tell me what I'm doing wrong?

Thank you
Chris

Share this post


Link to post
Share on other sites
maybe this is helpful -> [a href=\"http://magpierss.sourceforge.net/faq.php#caching-doesnt-seem-to-be-worki\" target=\"_blank\"]http://magpierss.sourceforge.net/faq.php#c...eem-to-be-worki[/a]

Share this post


Link to post
Share on other sites
Thanks for that, but I've looked that website over 50 times and haven't found out how to turn the caching off. The caching works properly, but I just cant disable it for certain scripts that need updated feed data.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.