viva-yasu/url-shrinker

0.1.3 2016-01-22 07:53 UTC

This package is not auto-updated.

Last update: 2024-12-21 20:14:01 UTC


README

UrlShrinker is a simple short URL generator via Google URL Shortener.

Install

$ php composer.phar require viva-yasu/url-shrinker:dev-master

or

{
  "require": {
      "viva-yasu/url-shrinker": "dev-master"
  }
}

write the above in composer.json

Usage

<?php

use VivaYasu\UrlShrinker\UrlShrinker;

$uriShrinker = new UrlShrinker('access key', 'long URL');
echo $uriShrinker->getShortUrl();

notice:
The param1 of This constructor is Google URL Shortener access key.
The param2 of This constructor is long URL to want to shorten.