PHP URL Shortening Class (v.gd & is.gd) API

This class a ready to use class, that aim to use v.gd & is.gd URL shortening API, the class is very self explanatory & easy to use.
I wrote everything so you can only upload the files to your server and you will have a URL shortening page ready to be used, all you have to do is change some of the design, which is optional.
The class is based on the API class written by v.gd developers, I added Human readable errors and made it optional to switch between the shortener services (v.gd or is.gd)
Features
1- Already stablished URL shortener (You only use an API)
2- Shorten your URL on the fly
3- Ready to use class with templates
4- Uses our cross-platform Copy to clipboard zClipDeBugged
5- Pretty Design
Usage
/* classToLoad */
require_once( 'sources/vgdClass.php' );
$libsClass = new vgdMainClass();
require_once( 'tpls/templates.php' );
$libsTemplates = new vgdTemplates();
$result = $libsClass->vgdShorten($_POST['urltoshorten'], $_POST['provider'], $_POST['allias'] );
#shortened?
if ($result["response"]){
$output .= $libsTemplates->showResults($result["response"]);
}
# Do we have errors?
$output .= $libsTemplates->showErrors($result["errorCode"], $errorMessage);
Demos
DEMO | PHP URL Shortening Class by AmgedOsman.com (v.gd & is.gd)
Download
Amged Osman
Egyptian blogger & web-developer, I write articles & codes! Senior Account Manager @ ConnectAds (Facebook & Microsoft Advertising). Author: Amged Osman Publisher: Amged Osman
Login with:
Ads By Google
Navigation
Categories


























