Skip to content

OzCat/url-box

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Url-box

URL Shorten bundle for PHP

How To Use/Demo

Install

Install with Composer

composer require ozcat/url-box

dwz.cn

$demo = new OzCat\Urlbox\Dwzcn();
$url = "http://url.com";
$bk = $demo->srt($url);
//Restore a url
$long = $demo->expand($bk);
echo $bk;

###is.gd

$demo = new OzCat\Urlbox\Isgd();
$url = "http://url.com";
$bk  = $demo->srt($url);
echo $bk;

###bit.ly You can get your own token at bitly.

$demo = new OzCat\Urlbox\Bitly($key);
$url = "http://url.com";
$bk  = $demo->srt($url);
//Restore a url
$long = $demo->expand($bk);
echo $bk;

###t.cn

please edit the appkey in file class/tcn.class.php before using. You can get your own appkey at sina.

include_once '../class/tcn.class.php';
$demo = new tcn($key);
$url = "http://url.com";
$bk  = $demo->srt($url);
//Restore a url
$long = $demo->expand($bk);
echo $bk;

About

url-shorten bundle base on PHP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages