Simple PHP library for Google URL Shortener API
As Google's URL Shortener service will be discontinued on March 30, 2019, there is no new development of this package from now on. Thanks
composer require h2akim/googl:*
Parameters available:
- longUrl
- object (optional) - return as object (if true)
namespace H2akim\Googl;
$googl = new Googl('your-api-key');
$googl->create([
'longUrl' => 'http://url.that.you.want.com'
]);
Parameters available:
- shortUrl
- projection - ANALYTICS_CLICKS / ANALYTICS_TOP_STRINGS / FULL
- object (optional) - return as object (if true)
namespace H2akim\Googl;
$googl = new Googl('your-api-key');
$googl->expand([
'shortUrl' => 'http://goo.gl/short-url'
]);