Introduction

Zii URL Shortener at zii.bz is a platform that takes long URLs and compresses them into fewer characters to make a URL link that is easiest to share, tweet, or email to friends & family.

Description

Users can create these short links through the web interface at zii.bz, or programatically create them through the URL Shortener API. With the Zii URL Shortener API you can write applications that use simple HTTP methods to create, inspect, and manage zii.bz short links from a desktop, mobile, or web. Links that users create through the URL Shortener can be automatically operated in your mobile applications that can handle those links, respectively. This automatic behavior provides the possible experience to your app users who open zii.bz links, no matter what platform or device they are on.

Quick start

Create a shortened URL

  • Visit the zii.bz URL shortener site at 
  • If you aren’t signed in, click the Register button in the top right corner to get you started.
  • Write or paste your URL in the Generate short link box.
  • Click SUBMIT
  • Below the “Generate short link ” box, you’ll see the long version of your url and the short version. Once created, your link won’t expire unless it has to be removed for spam, privacy, or legal reasons.

    Get List Of Single Shorten Url By GET

    Copy
            
            Method PHP CURL 'GET'
    $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_PORT => "443", CURLOPT_URL => "https://zii.bz/api/gshort?accountID=eyJpdiI6ImZ2M0JTbUNvbTNsWHhTUjU1a1pacVE9PSIsInZhbHVlIjoiR0JWUFI4Z1dtN2U4aWRyNVVJYkZrNE1oeDYwQmRQXC9wUnBXVHlDamhHMEFkM2pJRlRjRFZRSDlBWXhWejl0ZWwiLCJtYWMiOiIzNTQzOGI2NWU5ODgxOTVjN2U0ZTE5ZWIwMjA3MTg2ODBiZDliOTk5ZGMzNDU5ZWU1NGMwNzM3NWUyNzUwNTk4In0&UrlId=6MsmiA", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => array(), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { return "cURL Error #:" . $err; } else { return json_decode($response,true); }

    Create Short Url By POST

    mainUrl  Your Url to Shorten E:g http://www.example.com/

    Copy
            
            Method PHP CURL 'POST'
    $curl = curl_init(); $data = array( 'mainUrl' => 'http://www.example.com/', ); curl_setopt_array($curl, array( CURLOPT_PORT => "443", CURLOPT_URL => "https://zii.bz/api/short", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => $data, CURLOPT_HTTPHEADER => array(), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { return "cURL Error #:" . $err; } else { return json_decode($response,true); }

    Get List Of All Shorten Url By GET

    Copy
            
            Method PHP CURL 'GET'
    $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_PORT => "443", CURLOPT_URL => "https://zii.bz/api/gshort?accountID=eyJpdiI6ImZ2M0JTbUNvbTNsWHhTUjU1a1pacVE9PSIsInZhbHVlIjoiR0JWUFI4Z1dtN2U4aWRyNVVJYkZrNE1oeDYwQmRQXC9wUnBXVHlDamhHMEFkM2pJRlRjRFZRSDlBWXhWejl0ZWwiLCJtYWMiOiIzNTQzOGI2NWU5ODgxOTVjN2U0ZTE5ZWIwMjA3MTg2ODBiZDliOTk5ZGMzNDU5ZWU1NGMwNzM3NWUyNzUwNTk4In0", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => array(), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { return "cURL Error #:" . $err; } else { return json_decode($response,true); }

    Get List Of Single Shorten Url By POST

    UrlId & accountID require to get Single  Shorted URL

    Copy
            
            Method PHP CURL 'POST'
    $curl = curl_init(); $data = array( 'accountID' => 'eyJpdiI6InZac242Nm1yNWlpT3VPTTlGWG9JSUE9PSIsInZhbHVlIjoiaXhKNVwvT0xrZk0rNE05UmR4Z3pwRWxYTmZCVjZOVWtuQmQwVmZrSWw0cUYreFRPaGU1UlVGVmo2WE9nb0dZMEgiLCJtYWMiOiJhNTRkMTUwZDFmMTUxMDc2ZDZmNzM1OTk1OTZkYmRlZmZmN2ZiOTk4MDc1MzNlY2Y1YWEwYWMzYWI2NmU5MjNjIn0', 'UrlId' => 'GgiQIb', ); curl_setopt_array($curl, array( CURLOPT_PORT => "443", CURLOPT_URL => "https://zii.bz/api/gshort", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => $data, CURLOPT_HTTPHEADER => array(), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { return "cURL Error #:" . $err; } else { return json_decode($response,true); }

    Get List Of All Shorten Url By POST

    accountID require to get all  Shorted URL

    Copy
            
            Method PHP CURL 'POST'
    $curl = curl_init(); $data = array( 'accountID' => 'eyJpdiI6InZac242Nm1yNWlpT3VPTTlGWG9JSUE9PSIsInZhbHVlIjoiaXhKNVwvT0xrZk0rNE05UmR4Z3pwRWxYTmZCVjZOVWtuQmQwVmZrSWw0cUYreFRPaGU1UlVGVmo2WE9nb0dZMEgiLCJtYWMiOiJhNTRkMTUwZDFmMTUxMDc2ZDZmNzM1OTk1OTZkYmRlZmZmN2ZiOTk4MDc1MzNlY2Y1YWEwYWMzYWI2NmU5MjNjIn0', ); curl_setopt_array($curl, array( CURLOPT_PORT => "443", CURLOPT_URL => "https://zii.bz/api/gshort", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => $data, CURLOPT_HTTPHEADER => array(), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { return "cURL Error #:" . $err; } else { return json_decode($response,true); }

    Delete Short Url

    UrlId  &  accountID require to delect  Shorted URL

    Copy
            
            Method PHP CURL 'POST'
    $curl = curl_init(); $data = array( 'UrlId' => 'Q3TGFe', 'accountID' => 'eyJpdiI6ImZ2M0JTbUNvbTNsWHhTUjU1a1pacVE9PSIsInZhbHVlIjoiR0JWUFI4Z1dtN2U4aWRyNVVJYkZrNE1oeDYwQmRQXC9wUnBXVHlDamhHMEFkM2pJRlRjRFZRSDlBWXhWejl0ZWwiLCJtYWMiOiIzNTQzOGI2NWU5ODgxOTVjN2U0ZTE5ZWIwMjA3MTg2ODBiZDliOTk5ZGMzNDU5ZWU1NGMwNzM3NWUyNzUwNTk4In0', ); curl_setopt_array($curl, array( CURLOPT_PORT => "443", CURLOPT_URL => "https://zii.bz/api/dshort", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => $data, CURLOPT_HTTPHEADER => array(), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { return "cURL Error #:" . $err; } else { return json_decode($response,true); }

    Create Short Url By GET

    Url_String  You to Shorting E:g http://www.example.com/

    Copy
            
            Method PHP CURL 'GET'
    $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_PORT => "443", CURLOPT_URL => "https://zii.bz/api/short?mainUrl=http://www.example.com/", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => array(), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { return "cURL Error #:" . $err; } else { return json_decode($response,true); }
              The MIT License (MIT)
    
            Copyright (c) 2018 Zii Url Shortener
    
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
    
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
    
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.