Entries Tagged 'Projects' ↓

Retrieving Delicious (Del.icio.us) Feed with PHP & CURL

Looking back on the progress since my last post about the Delicious RSS Importer (DRI) project, these past two weeks have seen only a small functional improvement. Alas, the journey of an Open Source Project.

PHP is rather new to me, but I was comfortable with the interpretive style with my experiences in Classic ASP, and PHP’s C-like syntax. I figured I could whip something out in a few minutes (maybe an hour once I saw what we could do) that would retrieve my Delicious feed using their API.

“Wait a minute!” you say, “Doesn’t Delicious already provide a way to find this information using JSON and this would then allow you to use JQuery to do a Remote Data call?” Ah yes, but only for public bookmarks. We’re trying to support all Delicious bookmarks here.

So let’s get back to the bane of PHP development: trying to find relevant, correct examples. Not only did I need to retrieve data using Curl, but I also needed to provide a Username and Password, over SSL. It felt like going from 0 to 100mph and I forgot to cover the basics first. But, I’m a “seasoned” developer, I can handle it.

A few hours later and I had code, that wouldn’t run. I was relegated to reading…a book. A little time with w3schools PHP section would have answered most of my questions, correctly.

These were the two things that made the progress slow:

  • Finding the correct way to concatenate strings in PHP – “.”
  • Finding the correct way to retrieve variables from “$_REQUEST” object

Enough already, let’s have the code!



Note: As Nathan has pointed out already, you don’t have to use “$user” or “$pwd” as they will be automatically populated via PHP. I choose to include them to highlight intentdidn’t know PHP did that at first.

Big Design Upfront: Delicious RSS Importer

In my last post, I introduced the mockups of a half-baked idea: Delicious RSS Importer. I was trying to explain the idea this past week and quickly realized that I need to put together some visuals to how this will work.

I’m not backsliding into an old habit of BDUF. I’ll keep this brief and use this latest post to simply work out the plan of how the major pieces fit.

Here’s the current intent:

Delicious RSS Importer Architecture

Delicious RSS Importer Architecture

Basically we need to have a server-side piece to proxy the data requests from Delicious and external RSS feeds. Those results are then stored client-side using Google Gears.

The other concern is that NO passwords are stored externally. Once you setup Delicious RSS Importer for your environment, your credentials remain private.

Finally, I managed to setup a dedicated project space for this work with the good folks at SourceForge.