Title: RSS problems
Last modified: August 18, 2016

---

# RSS problems

 *  [barryprice](https://wordpress.org/support/users/barryprice/)
 * (@barryprice)
 * [19 years, 10 months ago](https://wordpress.org/support/topic/rss-problems-4/)
 * Simply put, the fetch_rss() function is failing silently and I’m not sure how
   to find out why 🙁
 * The url ‘[http://ma.gnolia.com/rss/lite/people/barryprice&#8217](http://ma.gnolia.com/rss/lite/people/barryprice&#8217);
   is an RSS feed of my latest links on ma.gnolia.com (like del.icio.us but different
   🙂
 * The following code prints “no”, which is a surprise because the feed parses fine
   with other methods, eg. PHP5’s DOM parser. I need to get this working on a PHP4
   server though – any ideas?
 * `require_once(ABSPATH . WPINC . '/rss-functions.php');
    $rss = fetch_rss('http://
   ma.gnolia.com/rss/lite/people/barryprice'); if ( isset($rss->items) && 0 != count(
   $rss->items) ) { print "yes"; } else { print "no"; }

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [19 years, 10 months ago](https://wordpress.org/support/topic/rss-problems-4/#post-395970)
 * Okay, here’s the problems I found when I tried it…
 * First, that RSS feed doesn’t validate. Bad dates, weird stuff on the description,
   invalid email address. Might get them to fix that.
 * Secondly, the feed isn’t being retrieved by the Snoopy http client at all. The
   server returns a 301 Moved Permanently response, with a location of the exact
   same URI. I don’t have the slightest clue why it does this. I tried changing 
   user agents, nothing. It doesn’t happen with a browser or with wget, but with
   Snoopy it does and I have no idea why.
 * Anyway, sorry that I don’t have a solution for you, but the problem is somewhere
   in the interaction between this webserver and the Snoopy HTTP client. I can’t
   explain it.
 *  Thread Starter [barryprice](https://wordpress.org/support/users/barryprice/)
 * (@barryprice)
 * [19 years, 10 months ago](https://wordpress.org/support/topic/rss-problems-4/#post-395998)
 * Thanks man, I’ll point it out to them.
 * Barry
 *  Thread Starter [barryprice](https://wordpress.org/support/users/barryprice/)
 * (@barryprice)
 * [19 years, 10 months ago](https://wordpress.org/support/topic/rss-problems-4/#post-396014)
 * Hmm, the ATOM feed ([http://ma.gnolia.com/atom/lite/people/barryprice](http://ma.gnolia.com/atom/lite/people/barryprice))
   validates fine:
 * [http://feedvalidator.org/check.cgi?url=http%3A%2F%2Fma.gnolia.com%2Fatom%2Flite%2Fpeople%2Fbarryprice](http://feedvalidator.org/check.cgi?url=http%3A%2F%2Fma.gnolia.com%2Fatom%2Flite%2Fpeople%2Fbarryprice)
 * But I still get the same problem using it in the script. I don’t get a 301 in
   lynx or wget, I guess I need to figure out how to get Snoopy into debug mode 
   🙂
 * Looks like the problem is in Snoopy rather than Magpie though – I wonder if I
   can retrieve the feed using php/curl and stuff it through Magpie manually… Hmm.
 *  Thread Starter [barryprice](https://wordpress.org/support/users/barryprice/)
 * (@barryprice)
 * [19 years, 10 months ago](https://wordpress.org/support/topic/rss-problems-4/#post-396241)
 * Okay, the problem IS with Snoopy.
 * Snoopy sends an HTTP/1.0 request (as opposed to HTTP/1.1 which most apps now 
   use), and gets a 301 redirect in return.
 * Given that most HTTP clients can cope with 301 redirects, I suggest this is a
   bug (or perhaps “feature request”) for the Snoopy devs…
 *  Thread Starter [barryprice](https://wordpress.org/support/users/barryprice/)
 * (@barryprice)
 * [19 years, 10 months ago](https://wordpress.org/support/topic/rss-problems-4/#post-396308)
 * Ok, reported to the Snoopy devs here:
 * [http://sourceforge.net/tracker/index.php?func=detail&aid=1503597&group_id=2091&atid=202091](http://sourceforge.net/tracker/index.php?func=detail&aid=1503597&group_id=2091&atid=202091)
 *  [finalcut](https://wordpress.org/support/users/finalcut/)
 * (@finalcut)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/rss-problems-4/#post-396351)
 * well technically the problem is with curl.
 * the magpie stuff which uses snoopy which uses curl fails at reddit.com and mag.
   nolia – but at both for different reasons. You get a 500 error at reddit and 
   a 301 at mag.nolia.
 * lastRSS works for both – however it uses fopen. The problem with fopen is that
   some webhosts don’t allow it.
 *  Thread Starter [barryprice](https://wordpress.org/support/users/barryprice/)
 * (@barryprice)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/rss-problems-4/#post-396352)
 * That explains a lot, lastRSS is the solution I chose in the end, unfortunately
   I had to choose between PHP5 being necessary, or fopen() being necessary. fopen()
   seems more prevalent.
 * Plugin here:
    [http://www.barryprice.co.uk/magnolia-plugin/](http://www.barryprice.co.uk/magnolia-plugin/)

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘RSS problems’ is closed to new replies.

## Tags

 * [debugging](https://wordpress.org/support/topic-tag/debugging/)
 * [fetch_rss](https://wordpress.org/support/topic-tag/fetch_rss/)
 * [RSS](https://wordpress.org/support/topic-tag/rss/)
 * [valid](https://wordpress.org/support/topic-tag/valid/)

 * 7 replies
 * 3 participants
 * Last reply from: [barryprice](https://wordpress.org/support/users/barryprice/)
 * Last activity: [19 years, 8 months ago](https://wordpress.org/support/topic/rss-problems-4/#post-396352)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
