badams / google-url
This package is abandoned and no longer maintained.
No replacement package was suggested.
PHP implementation of Googles URL shortener API
1.0.2
2016-08-17 07:10 UTC
Requires
- php: >=5.4.0
- guzzlehttp/guzzle: ~5.0|~4.0
Requires (Dev)
- fabpot/php-cs-fixer: ^1.11
- phpunit/phpunit: ~4.2.0
This package is auto-updated.
Last update: 2020-06-12 01:39:36 UTC
README
GoogleUrl
An easy to use PHP implementation of Google's URL Shortener API
This project aims provide an easy to use implementation of the Google URL shortener API for PHP developers.
Installation
Install badams/google-url
using Composer.
$ composer require badams/google-url
Basic Usage
use badams\GoogleUrl\GoogleUrl; $url = new GoogleUrl('YOUR_API_KEY_HERE'); // Shorten echo $url->shorten('https://github.com')->id; > https://goo.gl/un5E // Expand echo $url->expand($short->id)->longUrl; > https://github.com;
License
GoogleUrl is open-sourced software licensed under the MIT License (MIT). Please see LICENSE for more information.