PHP code example of leadthread / php-bitly
1. Go to this page and download the library: Download leadthread/php-bitly 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/ */
leadthread / php-bitly example snippets
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"
bash
composer