created a link shortener connected with advertising network so we get paid when we shorten a link and make someone click on it. Easy way to earn extra money.

So, if you are a blogger, have website and traffic, now time to convert your valuable traffic to money. pay for it. When a link shortened, when clicked it will go to a page that contains ads for wait 5 second, then visitor will click Skip For This Ads, to go to real link.


For developers prepared API which returns responses in JSON format. Currently there is one method which can be used to shorten links on behalf of your account.

Just sign up here, then go to Link Tools / Developer API.

curl -H "public-api-token: YOUR_TOKEN" -X PUT -d ""

Retun in JSON format


Now, we`re going to interpret that using CURL in php. Note, that if CURL going to a https link, we must add below pieces code, OR no return will appear.

function shst($url){
$ch = curl_init();

curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
curl_setopt($ch, CURLOPT_URL, $apiurl);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT' );
curl_setopt($ch, CURLOPT_HTTPHEADER, array('public-api-token: YOUR_TOKEN_HERE','X-HTTP-Method-Override: PUT')); curl_setopt($ch, CURLOPT_POSTFIELDS, "urlToShorten=".$url); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); $data = curl_exec($ch); curl_close($ch); $obj = json_decode($data); $ret=$obj->{'shortenedUrl'}; return $ret; } echo shst('');

Above function will return

Demo here, hit blue button.