PHP code example of ekkalak / rebrandly-short-url
1. Go to this page and download the library: Download ekkalak/rebrandly-short-url 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/ */
ekkalak / rebrandly-short-url example snippets
kalak\Rebrandly\ShortURL;
$short_url = new ShortURL('YOUR-API-HERE', 'YOUR-WORKSPACE');
// Make your link shorter
// slashtag is not available
// https://developers.rebrandly.com/docs
$response = $short_url->shortUrl('https://www.your-domain.com/your-url', 'test short url', 'your-domain');
var_dump($response);