This extension allows you to short url through google url shortener service goo.gl.
Requirements ¶
Testing on Yii 1.1.8, but almost sure that it working in lower versions.
You must get an api key for goo.gl. Documentation for Google URL Shortener API.
Usage ¶
Extract file to protected/extensions/shorturl/ Activate component in configuration file:
'components' => array(
// ...
'shorturl' => array(
'class' => 'ext.shorturl.ShortUrl',
'apiKey' => 'xxxxxx', // apikey
),
// ...
}
And now usage it in your application:
Yii::app()->shorturl->short('http://mysite.com/MyReallyLongUrl?withLongLongParams=1');
User Contributed Notes 2
Re: Not working for me...
dckurushin, could you dump variable $result?
Sorry, this is my local server problem... it works fine
Im sorry but I think this is my local server problem... on my other server it works...
Leave a comment
If you have any questions, please ask in the forum instead.
Join the conversation to share a note.