11

PHP API Library

I've been working on a PHP class library that eases access to the ZenDesk API.  It's available via Google Code at http://code.google.com/p/zendesk-php-lib GitHub at https://github.com/tresni/zendesk-php-lib/.  Can use CURL with PHP 4 or 5 if it is available, otherwise it uses stream_context_create / file_get_contents and likely requires PHP 5.1.0.

require_once 'Zendesk.php';

$zd = new Zendesk(ACCOUNT, USERNAME, PASSWORD);

// returns users list in XML format (default)

$result = $zd->get(ZENDESK_USERS);

// swith to JSON

$zd->set_output(ZENDESK_OUTPUT_JSON);

$result = $zd->get(ZENDESK_USERS);

More examples at http://code.google.com/p/zendesk-php-lib/wiki/Examples .  Hope someone finds it useful ;-)

125 comments

Please sign in to leave a comment.