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;

Posted

in

by

Tags:

Comments

One response to “Quick short URL PHP function”

  1. Bogo Avatar
    Bogo

    I have to fix that :)

Leave a Reply

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

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

%d bloggers like this: