i don't
quite know


Macs, Movies, Games, Books, etc. The Rants of a Mad Man.

PHP Class for Pownce API (2.0)

March 19th, 2008 by Raj

When you come in to the office on a Monday morning and people ask you “So what did you get up to on the weekend?” I tend to cringe and perhaps quickly think of something a tad less nerdy than tell them the truth, which this weekend happened to be… “Oh, I spent Saturday night writing a better PHP Class for Pownce’s 2.0 API because what was available currently didn’t work the way I wanted it to.”


Download the PHP Class file here.

Basic Usage:
// Send a message to public
$pownce = new Pownce("username", "password", "apikey");
$pownce->postMessage("public", "just say hi to everyone");

Below is a short screentcast of how to use the class:


  • When using the “addOption” method if you try to add an option that is not used with the particular API call you’re invoking a string error message will be returned rather than XML or JSON. eg.
    $pownce->addOption("filter", "sent");
    will returnInvalid option "filter"
  • The $format argument in most methods is defaulted to xml but can be set to json if you wish
Filed under Tech having 2 Comments »