A simple Bitly URL Shortener.
PHP Library based on Guzzle to generate short links using Bit.ly API V4
The recommended way to install this library is through Composer.
# Install Composer
curl -sS https://getcomposer.org/installer | php
Next, run the Composer command to install:
php composer.phar require echevarria/bitlyv4php:dev-master
After installing, you need to require Composer's autoloader:
require 'vendor/autoload.php';
use Echevarria\Bitly\Bitly;
$token = 'yourBitlyToken';
$bitly = new Bitly($token);
$short = $bitly->shorten('https://long-url.com');