the link shrink
Return to the homepage

The L2L.at Server connection

To incorporate the L2L.at URL shrinker into your own site, the only requirements are:
  • registration to L2L.at
  • a little coding on your website’s server

Upon registration, you will be assigned an API key.

Armed with your API key you can make make a call to L2L.at to shrink the required URL and retrieve an XML file containing the results of the shrink.

The API call is made to the URL compiled like this:

http://l2l.at/api.php?apikey=[API_KEY]&url=[url to shrink]

With two arguments, L2L.at is requested to load the linked page and retrieve the page title.

or
http://l2l.at/api.php?apikey=[API_KEY]&url=[url to shrink]&title=[title of the webpage]

With three arguments, L2L.at is NOT requested to load the linked page and therefore is a far quicker request.

You can easily access the power of L2L.at from your own php.

Try this example:

<?php
function shrink($apikey,$url,$title) {
return simplexml_load_file("http://l2l.at/api.php?apikey=" . $apikey . "&url=" . urlencode($url) . (($title)?"&title=" . urlencode($title):"")));
}
$title=null;
$title="Polyfex limited"; // Setting $title to anything other than null will make L2L.at read the submitted page to retrieve the title. This will be slower.
$xml=shrink("[API_KEY]","www.polyfex.com",$title);
echo($xml->title."<br />");
echo($xml->url."<br />");
echo($xml->longurl."<br />");
?>

The ‘shrink’ function above will shrink the $url argument and return an XML object containing the results.

If the operation is successful the resulting XML will have keys:

  • url: the new shrunken URL
  • title: the page title of the linked webpage
  • longurl: the linked URL

If the operation is not successful the resulting XML will have only one key:

  • error: the error message
 

Login

Register

Why?

Registered users can keep track of the number of clicks each link gets over the previous year or the current month.

Developers can also include l2l.at functionality in their own sites, with a simple http request and an api secret.

Easily Shrink your Links from your browser with the ‘Shrink this!’ hyperlink found in the footer of this page.

Just drag this link to your browser’s toolbar. When you find a page you want to post on another site, but the address is long, you will then be able to click on ‘Shrink This!’ and the URL will be loaded into L2L.at, automatically.