PHP code example of fireguard / url-shortener

1. Go to this page and download the library: Download fireguard/url-shortener library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

fireguard / url-shortener example snippets


  composer 

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

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

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