SimplePie Filter
May 06 2008 06:38 am | SimplePie
Update: Enabled matches with words that contain quotes.
Update: Fixed a bug where the title wasn’t strtolower-ed.
Just uploaded a SimplePie addon called SimplePie Filter. It’s adds the ability to filter SimplePie items that match certain keywords.
Download: simplepie_filter-2.zip



Latisha on 29 Oct 2008 at 10:15 am #
Interesting to know.
ian on 19 Nov 2008 at 5:31 am #
Can it work on all the data that can be found per item? specially on media rss?
tonx on 26 Dec 2008 at 1:26 pm #
Hi Michael,
I am playing around with filter by keyword and I am running into a few problems.
In the simplepie_filter.php there is a line of code that says ‘clinton loves obama’. I can’t figure out why this is there and as I use your example to filter by other words I wonder what I should change this too?
I am also puzzled that as I add specific rss feeds I only get three lines of output.
I am still learning php so I am a bit of a simpleton. Thanks for creating the example.
Chris on 01 Mar 2009 at 1:55 pm #
Sorry if this is painful for you and I appreciate your time. I’m just getting started with trying to incorporate rss in websites…
I’m trying to figure out how to use the simple pie filter add on you wrote. First, THANK YOU for writing and sharing it!!!!
I’m trying to determine how the search parameters get into your demo script. How do I specify the feed urls in the simplepie filter add-on script provided in your demo?
A. do i need to create a form for getting the words to populate $words? Is that how the query string gets built?
B. simple pie has auto detect so for the url i can put in cnn.com. but in your script i see:
‘http://blogsearch.google.com/blogsearch_feeds?q=clinton&oe=utf-8&client=firefox-a&um=1&ie=utf-8&num=10&output=rss’,
Am I supposed to know where to put these and what order? I get q=query, oe=utf-8 for the octal encoding? and the browser? but HOW should I get that info? I’m guessing this is a query string compiled by the classed within the add-on when terms are fed from a form?
It seems like a great tool.
Kevin on 16 Jun 2009 at 6:34 am #
Hi micheal, I would like to know if you can update your mod or explain me how to do so it can filter twice ? let me explain :
I have to filter words to see the news relative to the brand I work, this works great, but some news contains references to our competitors, so i would like to filter again to get rid of the news that refer to our competitors (i don’t really want to do their publicity).
Regards.
Kim on 25 Jun 2009 at 4:17 am #
Hello thanks for a great pice of code..
but can i do the reverse ???
filter out baced on keywords ??
Adam on 09 Jul 2009 at 7:18 am #
Michael, cannot thank you enough for sharing this code… I have used it as the basis for an XML driven shop at http://www.lipstickandlaceboutique.com . I wondered, is there anyway to mod the code to search in non standard nodes for keywords?
I have a field in my xml and would love to search within that too? Thanks once again.
Adam on 09 Jul 2009 at 7:19 am #
Sorry I included tag code and it was stripped out (quite rightly)… Last sentence should read “I have a ‘Brand’ node in my xml and would love to search within that too.”