Questions tagged [simplepie]

SimplePie is a PHP library intended to make it ridiculously easy for people to manage RSS and Atom feeds.

SimplePie is:

  • A code library, written in PHP, intended to make it ridiculously easy for people to manage RSS and Atom feeds.

  • An easy to use API that handles all of the dirty work when it comes to fetching, caching, parsing, normalizing data structures between RSS and Atom formats, handling character encoding translation, and sanitizing the resulting data.

  • Free (i.e. no cost) open-source software, with a license more liberal than the GPL (BSD-licensed), that was built and improved over the course of years by people who have a passion for good software that makes people's lives easier.

  • Well documented with a complete API reference, tutorials and screencasts for popularly requested uses, and details about the inner workings of the library.

  • Always looking for more people to contribute to the project in terms of code, patches, support, and evangelism.

  • A solution where we've worked very hard to keep the bar as low as possible for people who want to use it, but at the same time you MUST have a fundamental grasp of the PHP language. If you don't know PHP, and are interested in getting a handle on the basics, we recommend PHP 101: PHP For the Absolute Beginner (begin with parts 1-3, then move onto parts 4-7 making sure you actually understand them).

SimplePie is not:

  • A magical solution that will just "do it for you."

  • A copy-paste, "no code required" solution.

  • A full-blown feed aggregator like Google Reader, NewsGator Online, Bloglines, and the like.

If you don't know PHP, or are not willing to learn PHP, SimplePie is not the right solution for you.

However, SimplePie integrates well with a variety of blogging systems, wikis, forums, and code frameworks. Many of these third-party software packages are more end-user focused, and require less (if any) actual programming. Check out our SimplePie Plugins and Integration page to see if SimplePie integrates with software you already use, in a way that doesn't require much programming (if at all).

296 questions
13
votes
3 answers

How to inject multiple classes that share the same interface in Laravel 4

Say I have an interface CrawlerInterface with implementation PageCrawler and FeedCrawler; if we happen to need both classes in a controller, how can that be achieved with constructor injection? Previously we use a central ServiceProvider to register…
bitinn
  • 9,188
  • 10
  • 38
  • 64
7
votes
3 answers

PHP way of parsing HTML string

I have a php string that contains the below HTML I am retrieving from an RSS feed. I am using simple pie and cant find any other way of splitting these two datasets it gets from . If anyone knows of a way in simple pie to select…
ThomasReggi
  • 55,053
  • 85
  • 237
  • 424
6
votes
3 answers

Checking Valid RSS feed URL

I have decided to use SimplePie to parse RSS and Atom Feeds. What I want to do is that let people to input RSS and Atom Feeds URL through text fields. What If they put invalid RSS and Atom Feeds? I know that invalid Feeds won't be parsed through…
jwchang
  • 10,584
  • 15
  • 58
  • 89
5
votes
1 answer

Getting image url from RSS feed using simplepie

I am very new to php and simplepie. I would like to be able to use simplepie to store an image url to a variable. For my example, I will use the ebay rss feed (http://deals.ebay.com/feeds/rss). The image that I am trying to get the url of is in a…
acidic
  • 1,497
  • 2
  • 19
  • 23
5
votes
1 answer

How to get custom data from wordpress RSS with SimplePie

I have made some changes to a RSS feed in my Wordpress, and I'm using fetch_feed() to show data to another website. Imagine there are 2 websites called #Wordpress1 and #Wordpress2. This is the code i've added to #wordpress1's functions.php…
Amin
  • 1,637
  • 1
  • 22
  • 40
4
votes
3 answers

PHP: Ignoring errors and notices in a specific class

My site is completely custom, as such I like to know when I have poorly written code. I use set_exception_handler and set_error_handler to use custom classes to log errors to a file. This includes notices and warnings. Within my own code, this is…
Rob
  • 73
  • 1
  • 5
4
votes
2 answers

Split an RSS feed into separate feeds

I'm trying to find a way to split a single RSS feed into separate feeds based on keyword matches. Yahoo Pipes was my first thought, but I couldn't find a way to do it. Although Pipes has a split module, there is only one output module available for…
jpep
  • 41
  • 1
  • 4
4
votes
2 answers

How to get SimplePie to fail gracefully on invalid feed?

I'm trying to get SimplePie to fail gracefully if one of the feeds I hand it turns out to be unavailable or invalid (due to server issues on the feed provider's end) The code I've got is this: $this->feed= new SimplePie(); // Set which feed to…
dvanhook
  • 253
  • 1
  • 2
  • 10
4
votes
1 answer

Why am I getting memory leaks in SimplePie when using $item->get_permalink()?

I'm using SimplePie with PHP 5.3 (with gc enabled) to parse my RSS feeds. This works well and without problems when doing something like the following: $simplePie = new…
h2ooooooo
  • 39,111
  • 8
  • 68
  • 102
4
votes
1 answer

Simplepie RSS feeds to MySQL database server

I am currently using Simplepie to pull in my RSS feeds as shown in the configuration below. I want to move the $url to my database because my site loads way too slow. I have each url as a key value pair to the site's name. I want to keep this…
Mic Alexander
  • 93
  • 1
  • 8
3
votes
3 answers

Getting deprecated error with Simplepie

I have installed the latest Simplepie code (1.2.1) and I am using the demo code they provide:
Darrell
  • 37
  • 3
3
votes
1 answer

How to filter/block RSS feed items with SimplePie

I've got a google news feed I display in my WordPress site, using the following code: $feed = fetch_feed($rss_url); // specify the source feed $limit = $feed->get_item_quantity(20); // specify number of items $items = $feed->get_items(0, $limit); //…
Yarin
  • 173,523
  • 149
  • 402
  • 512
3
votes
1 answer

Strange warning when trying to extend class

I started getting strange warnings, after extending a class that extends another Event_Feed_Item > My_Feed_Item > SimplePie_Item - Cannot extend from interface 'SimplePie_Item' - Implementors of methods in 'SimplePie_Item' However on runtime it…
Moak
  • 12,596
  • 27
  • 111
  • 166
3
votes
1 answer

SimplePie Error - Curl Timeout on Wordpress

I'm getting the error WP HTTP Error: cURL error 28: Operation timed out after 1001 milliseconds with 0 bytes received using the fetch_feed() method in my Wordpress Plugin. This is for trying to fetch a larger RSS feed and I need to increase the Curl…
ant-C
  • 85
  • 7
3
votes
1 answer

Using multiple feeds in simplepie with codeigniter

I'm trying to get simplepie to loop through a few rss feeds using codeigniter but I can only get it to display the feed items from the last feed in the array. I think it is to do with the foreach loop in the _get_feed function but everything I've…
jond
  • 93
  • 6
1
2 3
19 20