echevarria / bitlyv4php
A simple PHP Library based on Guzzle to generate short links using Bit.ly API V4
dev-master
2019-06-21 22:14 UTC
Requires
- guzzlehttp/guzzle: 6.*
This package is auto-updated.
Last update: 2024-04-22 09:05:58 UTC
README
A simple Bitly URL Shortener.
PHP Library based on Guzzle to generate short links using Bit.ly API V4
Installing
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';
Shortening a link
use Echevarria\Bitly\Bitly; $token = 'yourBitlyToken'; $bitly = new Bitly($token); $short = $bitly->shorten('https://long-url.com');