Quick short URL PHP function

Categories Open Technologies
function shortURL($long)
{
 $short=file_get_contents("http://is.gd/api.php?longurl=".$long);
 return $short;
}

Usage:

$short = shortURL("http://veryveryveryverylongurl.tld/something/verylong.php");
echo $short;

1 Comment

  • Bogo
    December 17, 2010

    I have to fix that :)

Leave a Reply to Bogo Cancel reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.