leadthread/php-bitly

Easily shorten URLs in PHP

4.0.0 2017-04-20 00:20 UTC

This package is auto-updated.

Last update: 2024-06-17 13:17:02 UTC


README

php-bitly

Latest Version Software License Build Status Scrutinizer Code Quality Code Coverage Dependency Status Total Downloads

Version 3 now uses OAuth2 as required by Bitly. Get your developer access token here

Installation

Install via composer - In the terminal:

composer require leadthread/php-bitly

Usage

use LeadThread\Bitly\Bitly;
$c = new Bitly("access token");
$result = $c->shorten("https://www.google.com/");
var_dump($result);
// string(21) "http://bit.ly/1SvUIo8"