Category: APIs
-
Shorten URLs with Zend Framework and bit.ly
This function uses version 3.0 of the bit.ly API. You’ll need to register for an account with them if you don’t already have one. Then you can retrieve your API key and begin using it immediately. function bitlyShorten($url) { $client = new Zend_Http_Client(‘http://api.bit.ly/v3/shorten’); $client->setParameterGet(array( ‘longUrl’ => $url, ‘login’ => ‘xyz’, ‘apiKey’ => ‘xyz’ )); $response…