This repository is used to share plugins, languages and other stuff for verified buyers. You can buy Premium URL Shortener at http://gempixel.com/buy/short
If you have found an issue with the main script, open an "Issue" and we will resolve it as soon as possible.
Send us pull requests and help improve the code.
The official API wrapper for Premium URL Shortener
The example below shows you how to shorten a URL without any other parameters. You need to get your API key from the settings page of the user control panel
include("API/Shortener.php");
$shortener = new kbrmedia\Shortener();
// Set the URL & API key
$shortener->setURL("http://myshort.site/api");
$shortener->setKey("APIKEY");
// Simple call
echo $shortener->shorten("https://gempixel.com");
To get the Short URL directly without having to deal with json you can chain the getShort() method as below
// Get short URL directly
echo $shortener->getShort()->shorten("https://gempixel.com");
To customize the URL, you can use the below to set a custom alias and the format - which in this case is in text
// Custom Alias
$shortener->setCustom("gempixel");
// Format: text or json
$shortener->setFormat("text");
echo $shortener->shorten("https://gempixel.com");
This sample allows you to unshorten a URL and some data
echo $shortener->unshorten("http://myshort.site/gempixel");