Learn Web Design, Coding & More. No Risk. No Contracts. Learn More

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);
Coveloping - Speed up your development

Share the wealth

Keep updated with the latest tutorials and snippets.