PhpDelicious - a wrapper for the del.icio.us API

Introduction

PhpDelicious is a PHP 5 library for accessing the del.icio.us API. It combines data from the main REST and JSON APIs and presents a consolidated interface. It also implements a file based caching system which eliminates the need to query on every request and ensures access to the API won't be throttled due to excessive requests.

Requirements

Set Up

Setting up PhpDelicious is easy simply copy it to a suitable directory on your server. By default it writes its cache files to /tmp/. If you don't have access to this directory (perhaps because you're using a shared hosting account) you'll need to create a new temporary directory and update the corresponding constant in php-delicious.inc.php (line 63).

  1. define('PHP_DELICIOUS_CACHE_PATH', '/tmp/');

Rate Limiting

PhpDelicious limits the number of requests made to the del.icio.us API to one per second (as required by del.icio.us). For read only requests it does this via file based caching and, to all intensive purposes, this is transparent to the end user. It's unlikely your data will change that often. For requests which write to the API it implements a delay mechanism. The delay is selective and is only applied if at least one second hasn't elapsed between consecutive requests.

Examples