Create Tiny URL Link With PHP Function

Tiny URL site allows you to compress the size of your URLs which is mostly used on the social networking site twitter, because of the limited characters you can use.

But to use the tiny URL feature you have to go there website and fill out a form to get your tiny URL.

With this function you can return the output of the tiny URL to be used anywhere on your site quickly and easily.

function getTinyUrl($url) {
    return file_get_contents("http://tinyurl.com/api-create.php?url=".$url);
}

Advertise here 50% Off

Comment