I’ve started using Stikkit for my to-do lists. I like that it allows you to write mixed content in a single note, so that you can keep dates, contacts, to-dos and little notes all in the same framework. It’s not perfect yet, but it works for me. With the recent launch of the Stikkit API things should get even more interesting.

Here’s a quick demo of how to access your most recent Stikkits in PHP (requires PHP 5, HTTP_Request and Services_JSON):

<?php
// stikkit.php
// Marius Watz - http://workshop.evolutionzone.com

require_once "PEAR/HTTP/Request.php";
require_once "JSON/JSON.php";

$req =& new HTTP_Request("http://api.stikkit.com/stikkits?api_key=xxxx");
$req->setMethod(HTTP_REQUEST_METHOD_GET);
$req->addHeader("Accept", "application/json, */*");
$response = $req->sendRequest();

if (PEAR::isError($response)) echo $response->getMessage();
else {
  $json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);
  $value = $json->decode($req->getResponseBody());
  printNestedArray($value);
}

function printNestedArray($a) {
  echo "<ul>";
  if(is_array($a))  {
    foreach ($a as $dbkey => $value) {
      echo "<li>".htmlspecialchars("$dbkey: ");
      if (is_array($value)) {
        printNestedArray($value);
      } else if(!is_object($value)){
        echo "'". chop($value);
      }
    }
  }
  else echo "$a</li>";
  echo "</ul>";
}
?>

Comment on this entry

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>