URL Shortener

To shorten the link, open the file https://cutt.ly/api/api.php remotely (eg via the php file_get_contents), and in the parameters: short enter the address to be shortened (it should be encoded so any special characters will be interpreted correctly), name specify the preferred shortening of the link, userDomain specify if you want to use your own domain, to do so send 1.

Possible parameters

key Your API key. Required
short URL you want to shorten. Required
name Your desired short link if not already taken
userDomain If set to 1, then it will use account's user domain. Check subscription plans for more details.

UTM tags, parameters etc.

The entered link should go through the built-in urlencode() function, then the link parameters will be sent, including UTM tags etc.

Examples

As a reply, json string will be sent, containing following data

url => status: 1 the shortened link comes from the domain that shortens the link, i.e. the link has already been shortened
url => status: 2 the entered link is not a link
url => status: 3 the preferred link name is already taken
url => status: 4 Invalid API key
url => status: 5 the link has not passed the validation. Includes invalid characters
url => status: 6 The link provided is from a blocked domain
url => status: 7 OK - the link has been shortened

If the status is equal to 7, then

url => date date of shortening the link
url => shortLink shortened link
url => fullLink original link
url => title website title

Errors

401 UnauthorizedYour API key is incorrect and a json with parameter auth:false has been returned
Subscription has expired or you've reached your shortening limitYou should consider upgrading your subscription plan

Analytics

In order to access URL statistics, open the file https://cutt.ly/api/api.php remotely (eg via the php file_get_contents), with the following parameters

key Your API key. Required
stats The shortened URL you want to check statistics of. Required

Examples

If status is equal to 1

In order to access URL statistics, open the file https://cutt.ly/api/api.php remotely (eg via the php file_get_contents), with the following parameters

stats=>dateDate of shortening the link
stats=>clicksTotal number of clicks
stats=>titleTitle of the shortened link
stats=>fullLinkOriginal link
stats=>shortLinkShortened link
stats=>facebookThe number of clicks from Facebook
stats=>twitterThe number of clicks from twitter
stats=>linkedinThe number of clicks from linkedin
stats=>restOther clicks

In order to display subsequent data, it should take place in a loop. (E.g. for, while, foreach loop)

Let $i to be the next variable in the array.

stats=>refs=>ref=>$i=>link displaying the domain from which you clicked on the link
stats=>refs=>ref=>$i=>clicks displaying the number of clicks from that domain
stats=>devices=>geo=>$i=>tag displaying the abbreviation of the country from which the link was clicked
stats=>devices=>geo=>$i=>clicks displaying the number of clicks from this country
stats=>devices=>dev=>$i=>tag displaying the type of device from which the link was clicked
stats=>devices=>dev=>$i=>clicks displaying the number of clicks from this device
stats=>devices=>sys=>$i=>tag displaying the operating system of the device from which the link was clicked
stats=>devices=>sys=>$i=>clicks displaying the number of clicks from this system
stats=>devices=>bro=>$i=>tag displaying the browser from which the link was clicked
stats=>devices=>bro=>$i=>clicks displaying the number of clicks from this browser