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
3
votes
2 answers

Pulling posts from another WordPress site

I am trying to get the 2 latest posts from my personal website, using the code below from http://codex.wordpress.org/Function_Reference/fetch_feed#Usage

user2209033
3
votes
1 answer

Static function caches that aren't being cleaned in PHP 5.3.28?

I'm using SimplePie with PHP 5.2.17 to parse my RSS feeds through the WordPress plugin feedwordpress. This works well and without problems if I make sure to use this patch to simplepie (in the file IRI.php). However, if I change my PHP to use…
Tal Galili
  • 24,605
  • 44
  • 129
  • 187
3
votes
1 answer

access ID/GUID Attribute isPermaLink

I use SimplePie to parse RSS feeds in php. For pre-processing the result of SimplePie, I need to know if the the link is a permalink or not. The info is stored in this XML element: FileNr123 If $items is an instance…
The Bndr
  • 13,204
  • 16
  • 68
  • 107
3
votes
5 answers

PHP access to iTunes tags in an RSS feed

I need to get access to the iTunes tags in an RSS feed using PHP. I've used simplepie before for podcast feeds, but I'm not sure how to get the iTunes tags using it. Is there a way to use simplepie to do it or is there a better way? Okay I tried…
gbennett
  • 120
  • 1
  • 7
3
votes
2 answers

SimplePie html rssfeeds Codeigniter

I wanted to ask, I have a div that I would want to place RSS feeds from the BBC or CNN. Now that works but I wanted to paginate the feeds that come in, display 5 at a time with the others showing when the links are clicked. I am starting to write…
Joseph Izang
  • 766
  • 1
  • 13
  • 43
3
votes
1 answer

How to use SimplePie image handler

SimplePie is an open source RSS parser. Evidently, SimplePie can cache images from RSS feeds it processes. But I don't know what to make of the documentation. The example code looks like this $feed = new…
Richard
  • 209
  • 2
  • 10
3
votes
2 answers

Missing Get_favicon function in new Simplepie Release

In the new release the get_favicon method was removed as shown in the Changes in this Release section of documentation. When I try $item->get_favicon() I only get Call to undefined method SimplePie_Item::get_favicon() How am I able to get the…
3
votes
1 answer

SimplePie Caching Functionality (Possibly Extending It)

I have a personal project to cache some rss feeds locally on my NAS drive (using it's built-in web server and a chron job) so that I won't miss "posts" when my desktop machine is switched off. So far I have a simple php script set up that stores the…
sim099
  • 33
  • 3
2
votes
2 answers

How to get DOCUMENT_ROOT to work on both localhost and web host?

I have a WordPress plugin that I would like to work on localhost as well as in deployment without modification, but I can't seem to set the location for a directory using one statement. I would like to do…
rick
  • 4,103
  • 9
  • 37
  • 41
2
votes
1 answer

SimplePie regex errors

1.3 dev version of SimplePie on xampp with PHP 5.3. I am able to get an RSS feed and display it but I get these errors for every item fetched: Warning: preg_match() [function.preg-match]: Compilation failed: nothing to repeat at offset 562 in…
Bhavik Maneck
  • 98
  • 1
  • 5
2
votes
2 answers

Using SimplePie with Yii

I want to be able to use SimplePie on Yii. I'm using the 1.3-dev version of simplepie I created a "vendors" folder, put all I had in the .tar.gz in a simplepie subfolder. Then i add this lines at the beginning of my…
Polux
  • 21
  • 1
  • 3
2
votes
2 answers

Get attributes from item(tag) using SimplePie

I'm trying to get attributes for "id" tag in feed with usage of simplepie. This is the fragment of code from feed: 2012-03-12T08:26:29-07:00 http://www.example.com Draw…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/php" class="post-tag grid--cell" title="show questions tagged 'php'" rel="tag">php</a> <a href="../../questions/tagged/rss" class="post-tag grid--cell" title="show questions tagged 'rss'" rel="tag">rss</a> <a href="../../questions/tagged/feed" class="post-tag grid--cell" title="show questions tagged 'feed'" rel="tag">feed</a> <a href="../../questions/tagged/simplepie" class="post-tag grid--cell" title="show questions tagged 'simplepie'" rel="tag">simplepie</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Mar 12 '12 at 17:05">asked Mar 12 '12 at 17:05</time> <a href="../../users/385869/chubbyk" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/385869.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="chubbyk" /> </a> <div class="s-user-card--info"> <a href="../../users/385869/chubbyk" class="s-user-card--link">chubbyk</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">6,212</li> <li class="s-award-bling s-award-bling__gold" title="13 gold badges">13</li> <li class="s-award-bling s-award-bling__silver" title="53 silver badges">53</li> <li class="s-award-bling s-award-bling__bronze" title="67 bronze badges">67</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-9628590"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>2</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status "> <strong>2</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/9628590/can-simplepie-grab-images-from-feeds" class="question-hyperlink">Can SimplePie grab images from feeds</a></h3> <div class="excerpt">I am using this simplepie and i have uploaded the files to my host. Everything seems to be working fine except one thing. The blog that i'm getting the feed from has images in it, and when i use the simplepie to view the feed, the images don't show…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/php" class="post-tag grid--cell" title="show questions tagged 'php'" rel="tag">php</a> <a href="../../questions/tagged/import" class="post-tag grid--cell" title="show questions tagged 'import'" rel="tag">import</a> <a href="../../questions/tagged/rss" class="post-tag grid--cell" title="show questions tagged 'rss'" rel="tag">rss</a> <a href="../../questions/tagged/feed" class="post-tag grid--cell" title="show questions tagged 'feed'" rel="tag">feed</a> <a href="../../questions/tagged/simplepie" class="post-tag grid--cell" title="show questions tagged 'simplepie'" rel="tag">simplepie</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Mar 09 '12 at 03:37">asked Mar 09 '12 at 03:37</time> <a href="../../users/1258449/user1258449" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/1258449.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="user1258449" /> </a> <div class="s-user-card--info"> <a href="../../users/1258449/user1258449" class="s-user-card--link">user1258449</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">31</li> <li class="s-award-bling s-award-bling__silver" title="1 silver badges">1</li> <li class="s-award-bling s-award-bling__bronze" title="3 bronze badges">3</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-9163038"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>2</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>3</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/9163038/extract-complete-content-of-websites-via-feed-in-php" class="question-hyperlink">extract complete content of websites via feed in php</a></h3> <div class="excerpt">i want get complete content of a news or post of a website via feed. but we know that many websites only presents some part of news or post via their feed. of course i know that exists a script called SimplePie that is developed for get content of…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/php" class="post-tag grid--cell" title="show questions tagged 'php'" rel="tag">php</a> <a href="../../questions/tagged/feed" class="post-tag grid--cell" title="show questions tagged 'feed'" rel="tag">feed</a> <a href="../../questions/tagged/simplepie" class="post-tag grid--cell" title="show questions tagged 'simplepie'" rel="tag">simplepie</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Feb 06 '12 at 16:02">asked Feb 06 '12 at 16:02</time> <a href="../../users/498504/ahmad-badpey" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/498504.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Ahmad Badpey" /> </a> <div class="s-user-card--info"> <a href="../../users/498504/ahmad-badpey" class="s-user-card--link">Ahmad Badpey</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">6,348</li> <li class="s-award-bling s-award-bling__gold" title="16 gold badges">16</li> <li class="s-award-bling s-award-bling__silver" title="93 silver badges">93</li> <li class="s-award-bling s-award-bling__bronze" title="159 bronze badges">159</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-8663744"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>2</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>4</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/8663744/simplepie-not-parsing-google-news-rss-feed" class="question-hyperlink">simplepie not parsing google news rss feed</a></h3> <div class="excerpt">This code works perfectly with any other rss feed but not with google news feeds. I do not know what I am doing wrong, I think it's some bug. I keep getting this error when I try to read google news feeds This XML document is invalid, likely due to…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/php" class="post-tag grid--cell" title="show questions tagged 'php'" rel="tag">php</a> <a href="../../questions/tagged/rss" class="post-tag grid--cell" title="show questions tagged 'rss'" rel="tag">rss</a> <a href="../../questions/tagged/simplepie" class="post-tag grid--cell" title="show questions tagged 'simplepie'" rel="tag">simplepie</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Dec 29 '11 at 03:35">asked Dec 29 '11 at 03:35</time> <a href="../../users/1120045/acrobat" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/1120045.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="acrobat" /> </a> <div class="s-user-card--info"> <a href="../../users/1120045/acrobat" class="s-user-card--link">acrobat</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">57</li> <li class="s-award-bling s-award-bling__silver" title="3 silver badges">3</li> <li class="s-award-bling s-award-bling__bronze" title="11 bronze badges">11</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="s-pagination pager fr"> <a class="s-pagination--item" href="../../questions/tagged/simplepie_page=1" rel="prev" title="Go to page 1">Prev </a> <a class="s-pagination--item" href="../../questions/tagged/simplepie_page=1" rel="" title="Go to page 1">1</a> <div class="s-pagination--item is-selected">2</div> <a class="s-pagination--item" href="../../questions/tagged/simplepie_page=3" rel="" title="Go to page 3">3</a> <div class="s-pagination--item s-pagination--item__clear">…</div> <a class="s-pagination--item" href="../../questions/tagged/simplepie_page=19" rel="" title="Go to page 19">19</a> <a class="s-pagination--item" href="../../questions/tagged/simplepie_page=20" rel="" title="Go to page 20">20</a> <a class="s-pagination--item" href="../../questions/tagged/simplepie_page=3" rel="next" title="Go to page 3"> Next</a> </div> </div> </div> </div> </div> <script src="../../static/js/stack-icons.js"></script> <script src="../../static/js/fromnow.js"></script> </body> </html>