Tech Thought

Tech tips, hints, and general musings. PHP, Perl, Mysql, Javascript, AJAX, JSON, Linux, Mac OSX

Entries Tagged ‘rss’

MagpieRSS strange characters in feed problem

Recently we had a problem with our RSS feed appearing strangely on our homepage.  We were using MagpieRSS to read our RSS feed, however apostrophes and other characters appeared scrambled. After much reading and googling, it turned out that our page wasn’t using UTF-8 as its encoding method – and our feed was.  So the [...]

Leave a Comment

How-To: Read an RSS Feed with PHP

An easy way to read an RSS feed with PHP is to use the MagpieRSS library. This provides a simple API to read an RSS feed, and elegantly deal with the issues of timeouts and caching. It’s as simple as: require(‘rss_fetch.inc’); $rss = fetch_rss($url); echo “Site: “, $rss->channel['title'], “<br> “; foreach ($rss->items as $item ) [...]

Leave a Comment

How-To: Export RSS feeds from Mac Mail

To export all your RSS feeds from Mac Mail as a list, open up terminal and enter the following on a single line: IFS=$’\n’;for i in $(find ~/Library/Mail/RSS/ -name “Info.plist”);do grep “<string>http://” $i | sed “s/.*\(http[^<]*\).*/\1/”;done Thanks to macosxhints.com for this one!

Comments (1)