fireguard/url-shortener

Url Shortener.

v0.1.0 2017-05-18 21:18 UTC

This package is not auto-updated.

Last update: 2024-12-22 03:27:58 UTC


README

Installation

This Package can be installed through the composer.

In order for the package to be automatically added to your composer.json file, run the following command:

  composer require fireguard/url-shortener

Or if you prefer, add the following snippet manually:

{
  "require": {
    ...
    "fireguard/url-shortener": "^0.1"
  }
}

Usage

Basic instructions for usage.

Google URL Shortener

Generate Google API Key

https://developers.google.com/console/help/generating-dev-keys

$google = new GoogleUrlShortener('YOUR_GOOGLE_KEY');
$url = $google->shorten('https://google.com.br/');

ToLy URL Shortener

$toLy = new Fireguard\UrlShortener\ToLyUrlShortener();
$url = $toLy->shorten('https://google.com.br/');