{API}

Create

Parameters

Name Type Description
api key string your api key
url string Base64 encoded version of your long url. base64_encode() in PHP.

Return values

Name Type Description
url_id int The unique id value of making URL
short_url string Short URL including the domain name.
part_short_url string Short URL without the domain name.
original_url string Original long url
date_create string Date created. In the format dd.mm.YYYY hh:mm:ss

Example request

jQuery.noConflict()(function($){
    $(document).ready(function (e) {
        var url = 'http://linkmotoru.com/api/v1/api.php';
        var url_long = '<?php echo base64_encode("http://linkmotoru.com");?>';
        $.get
          (
             url,'api_key=e00cf25ad42683b3df678c61f42c6bda&url='+url_long,function(result,status)
                {
                    alert(result.data.url_id+'||'+
                            result.data.short_url+'||'+
                            result.data.part_short_url+'||'+
                            result.data.original_url+'||'+
                            result.data.date_create);		
                },
                "json"
        );
    });
});    
    

Example response

{
   "status":200,
   "data":{
      "url_id":"1",
      "short_url":"http://linkmotoru.com/P87Ayv",
      "part_short_url":"P87Ayv",
      "original_url":"http://linkmotoru.com",
      "date_create":"18.08.2017 19:10:54"
   }
}
    
Disable
Name Type Description
api key string your api key
disable_url string Base64 encoded version of your short url. base64_encode() in PHP.

Return values

Name Type Description
url_id int The unique id value of URL
short_url string Short URL including the domain name.
status string Short url status.
date_create string Date created. In the format dd.mm.YYYY hh:mm:ss

Example request

jQuery.noConflict()(function($){
    $(document).ready(function (e) {
        var url = 'http://linkmotoru.com/api/v1/api.php';
        var url_short = '<?php echo base64_encode("http://linkmotoru.com/P87Ayv");?>';
        $.get
          (
             url,'api_key=e00cf25ad42683b3df678c61f42c6bda&disable_url='+url_short,function(result,status)
                {
                    alert(result.data.url_id+'||'+
                            result.data.status+'||'+
                            result.data.short_url+'||'+
                            result.data.date_create);		
                },
                "json"
        );
    });
});    
    

Example response

{
   "status":200,
   "data":{
      "url_id":"1",
      "status":"disabled",
      "short_url":"http://linkmotoru.com/P87Ayv",
      "date_create":"18.08.2017 19:10:54"
   }
}
    
Activate
Name Type Description
api key string your api key
enable_url string Base64 encoded version of your short url. base64_encode() in PHP.

Return values

Name Type Description
url_id int The unique id value of URL
short_url string Short URL including the domain name.
status string Short url status.
date_create string Date created. In the format dd.mm.YYYY hh:mm:ss

Example request

jQuery.noConflict()(function($){
    $(document).ready(function (e) {
        var url = 'http://linkmotoru.com/api/v1/api.php';
        var url_short = '<?php echo base64_encode("http://linkmotoru.com/P87Ayv");?>';
        $.get
          (
             url,'api_key=e00cf25ad42683b3df678c61f42c6bda&enable_url='+url_short,function(result,status)
                {
                    alert(result.data.url_id+'||'+
                            result.data.status+'||'+
                            result.data.short_url+'||'+
                            result.data.date_create);		
                },
                "json"
        );
    });
});    
    

Example response

{
   "status":200,
   "data":{
      "url_id":"1",
      "status":"enable",
      "short_url":"http://linkmotoru.com/P87Ayv",
      "date_create":"18.08.2017 19:10:54"
   }
}
    
Info
Name Type Description
api key string your api key
enable_url string Base64 encoded version of your short url. base64_encode() in PHP.

Return values

Name Type Description
url_id int The unique id value of URL
long_url string The original decoded long url.
short_url string Short url part. (excluding domain name)
create_time string Date created. In the format dd.mm.YYYY hh:mm:ss
clicks int Total visits
preview_img string Link on the preview image
qr_img string Link to image qr-code
favicon string Link to the favicon
status string Short url status.
password bool Whether the url needs a password to access.

Example request

jQuery.noConflict()(function($){
    $(document).ready(function (e) {
        var url = 'http://linkmotoru.com/api/v1/api.php';
        var url_short = '<?php echo base64_encode("http://linkmotoru.com/P87Ayv");?>';
        $.get
          (
             url,'api_key=e00cf25ad42683b3df678c61f42c6bda&info_url='+url_short,function(result,status)
                {
                    alert(result.data.url_id+"||\n"+
                        result.data.long_url+"||\n"+
                        result.data.short_url+"||\n"+
                        result.data.create_time+"||\n"+
                        result.data.clicks+"||\n"+
                        result.data.preview_img+"||\n"+
                        result.data.qr_img+"||\n"+
                        result.data.favicon+"||\n"+
                        result.data.status+"||\n"+
                        result.data.password);		
                },
                "json"
        );
    });
});    
    

Example response

{
   "status":200,
   "data":{
     "url_id":"1",
        "long_url":"http://linkmotoru.com",
        "short_url":"P87Ayv",
        "create_time":"18.08.2017 19:10:54",
        "clicks":"63",
        "preview_img":"http://linkmotoru.com/images/linkmotoru.com.png",
        "qr_img":"http://linkmotoru.com/qrcodes/P87Ayv.png",
        "favicon":"http://linkmotoru.com/favicons/linkmotoru.com.ico",
        "status":"enable",
        "password":"true"
   }
}
    
List

Parameters

Name Type Description
api key string your api key
list boolean true

Return values

Name Type Description
short_url string Short URL including the domain name.

Example request

jQuery.noConflict()(function($){
    $(document).ready(function (e) {
        var url = 'http://linkmotoru.com/api/v1/api.php';
        $.get
          (
             url,'api_key=e00cf25ad42683b3df678c61f42c6bda&list_url=true',function(result,status)
                {
                    alert(result.data.short_url);		
                },
                "json"
        );
    });
});    
    

Example response

{
   "status":200,
   "data":{
      "short_url":{
      		"http://linkmotoru.com/P87Ayv",
                "http://linkmotoru.com/sdw12v",
                "http://linkmotoru.com/P415av"
      		}
   }
}