Skip to content

[Discontinued] Simple PHP library for Google URL Shortener API

License

Notifications You must be signed in to change notification settings

h2akim/googl-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google URL Shortener API

Simple PHP library for Google URL Shortener API

Discontinuation

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

Getting Started

Composer

composer require h2akim/googl:*

How to Use

Create a new shorten URL

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'
]);

Retrieve original url from shorten URL

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'
]);

About

[Discontinued] Simple PHP library for Google URL Shortener API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages