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.

0 comments ↓

There are no comments yet...Kick things off by filling out the form below.

Leave a Comment