Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...

When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Additional Methods

The bitly API require that authentication credentials be supplied as query arguments. To get started, you'll need a free bitly user account and apiKey. Signup at:

bitly currently also supports the OAuth 2 draft specification. You could provide a generated OAuth access token to Zend_Service_ShortUrl_BitLy using setOAuthAccessToken or as constructor argument.

= new Zend_Service_ShortUrl_BitLy('username','apiKey');

// Shorten a URL:
$short $bitly->shorten(''); //

// Inflate or unshorten a short URL:
$long  $bitly->unshorten(''); //
setApiLogin($login, $apiKey);

Takes the required $login username and $apiKey and passes it to the service.


Use the OAuth $accessToken for authentication

Zend Framework