Quick short URL PHP function

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;

One response to “Quick short URL PHP function”

  1. Bogo says:

    I have to fix that :)

Leave a Reply

Your email address will not be published. Required fields are marked *