Jump to content

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
Link to comment
https://forums.phpfreaks.com/topic/10657-magpie-rss-help/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.