Elliot Haughin

Weblife

Thoughts

  • About to pay for moblie me. Absolutely love the service so far. Will be well worth it!
  • Time for bed. I'll forget I've changed my hair and get a shock when I look in the mirror tomorrow!
  • Hair finished, and it's very very black!
  • Dying my hair. First time I've done by own. Hope it comes out ok. I'll see in 30 minutes!
  • Down the pub with the church crew. It's strange discussing the preach over a cold pint!
  • Anyone going to the 5pm service at hillsong London? It's gonna be great!
  • The perfect night. Lots to drink, house party with friends, no hangover and a fried breakfast. Brilliant!
  • Phoned dell about my fried graphics card in my xps. This warranty is great! Engineer coming to my work to replace the card on Tuesday!

Tunes

  • 19 hours agoSwitchfoot – Meant to Live
  • 19 hours agoJet – Hold On
  • 19 hours agoTrain – Ordinary
  • 19 hours agoDashboard Confessional – Vindicated
  • 20 hours agoMe First and the Gimme Gimmes – She Believes In Me (Kenny Rogers)
  • 20 hours agoMe First and the Gimme Gimmes – On The Road Again (Willie Nelson)
  • 20 hours agoMe First and the Gimme Gimmes – Goodbye Earl (Dixie Chicks)
  • 20 hours agoMe First and the Gimme Gimmes – San Francisco
  • 20 hours agoMe First and the Gimme Gimmes – My Boyfriend's Back
  • 20 hours agoMe First and the Gimme Gimmes – Blowin' in the Wind

SimplePie CodeIgniter Library

SimplePieParsing RSS feeds with PHP has always been a bit of a pain the ass.
But, SimplePie makes it much simpler!

In your controllers, simply load the library, set your feed url.. and you’re away!

$this->load->library('simplepie');
$this->simplepie->set_feed_url('http://feeds.haughin.com/haughin');
$this->simplepie->set_cache_location(APPPATH.'cache/rss');
$this->simplepie->init();
$this->simplepie->handle_content_type();
 
$data['rss_items'] = $this->simplepie->get_items();

Then, to use the feed data:

echo "<li>";
foreach($rss_items as $item) {
	echo "<li>";
	echo "<a href='" .$item->get_link() . "'>";
	echo $item->get_title();
	echo "</a>";
	echo "</li>";
}
echo "</li>";

You can pretty much use the data how you like… check out the simplepie documentation to see all of the data you can get from a feed.

Download Simplepie CodeIgniter Library

Version: 1.0

Outside ChurchOutside ChurchOutside ChurchOutside ChurchOutside ChurchOutside ChurchOutside ChurchHouse PartyHouse PartyHouse PartyHouse PartyHouse PartyHouse PartyHouse PartyHouse PartyHouse PartyHouse PartyHouse Party