It seems you aren't registered yet, Register now for extra features.



Developers

Developers can now make use of our API and create short and proxified urls. Usage is simple and example codes for PHP will be proviced. Also, you can use it to see where the Tinyby redirect points. It is as simple as sending a GET request to the API url with the appropriate parameters to get a response.

Creating a Tinyby redirect

http://Tinyby.com/api.php - This is the api link for creating redirects. There is 3 parameters:

  • u - This parameter is required. Pass the URL to create a redirect for here
  • s - This parameter is optional. Pass a short name here. Max length of 30 characters. This will appear as http://tinyby.com/yourshort. If it is already existing, it will generate one for you and return that.
  • p - This parameter is also optional. Give this the appropriate parameter to make the redirect proxified. Pass it either a 1, yes or true to enable.
  • Usage:

    Here is a PHP function you can incorporate into your project to make use of this. You are free to make any distributions to this code.
    	function createRedirect($url,$short='',$proxified='')
    	{
    		$url = str_replace('&','(*)',$url);
    		$shorturl= file_get_contents('http://tinyby.com/api.php?u='.$url.'&s='.$short.'&p='.$proxified);
    		return $shorturl;
    	}
    
    So within your code you can simply do something like the following
    $mynewlink = createRedirect('http://BlindingProxy.com','blinding');
    echo $mynewlink;
    
    This will print out the new link. Note: Passing a value to the short parameter or proxified parameter is optional. Leaving the short parameter blank will have the server generate one. If the short 'blinding' is already taken, then a random code will be generated for it.

    Retrieving the full URL

    Sometimes you may want to determine what the full url is for a shortened link. This is just as easy and only involves one parameter. You pass it the full link, such as http://tinyby.com/google and it would return the full link, in this case http://google.com.

    http://Tinyby.com/apiget.php - This is the api link for resolving redirects. There is only one parameter:

  • u - This parameter is required. Pass it the Tinyby shortened link and you will recieve the full URL that it points to.
  • Usage:

    Here is another PHP function that you can add into your project. Add it in the same way as the function for creating a redirect.
    	function resolveRedirect($url)
    	{
    		$resolvedurl= file_get_contents('http://tinyby.com/apiget.php?u='.$url);
    		return $resolvedurl;
    	}
    
    Then you can simply do something like the following:
    $theFullLink = resolveRedirect('http://tinyby.com/n2');
    echo $theFullLink;
    
    And this will resolve the full url, which will be http://google.com

    Of course, this can be incorporated in any language. You just need to understand how to download the contents of a specific URL for that language you are working with.