Failed to connect to MySQL: (1045) Access denied, unknown user 'h57r6fte' API Documentation -

API Documentation

Our API allows you to retrieve informations from our website via GET request and supports the following query parameters:

Name Description
url (required) This parameter creates a short URL for your URL (site), and will return the following: id (unique id), url (site url), date (date and time) and the short (shortned url) value.
custom (optional) This parameter requests the URL (site) information such as id (unique id), url (site url), alias (alias or custon name), hits (hits from visitors), date (date and time), short (shortned url), and the stats (url stats page) value.


URL parameter

Here is an example of a GET request on our API:

http://i2c.sk/api.php?url=http://it2core.sk

This is the output that our API will return when you query for an url:
{
   "apiVersion":"1.0",
   "data":{
	  "id":"1",
	  "url":"http://it2core.sk",
	  "custom":"http://i2c.sk/it2core",
	  "short":"http://i2c.sk/3xOCa"
   }
}
				
An example of json decoding would be the following PHP code:

<?php
header('Content-Type: text/plain; charset=utf-8;');
$file = file_get_contents("http://i2c.sk/api.php?url=http://it2core.sk&custom=information");
print_r(json_decode($file));
?>