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("".$url);
Back to top

Fastest WordPress Hosting With WPEngine

Stunning speed, powerful security, and best-in-class customer service. At WP Engine.

Risk free for 60 days


  1. says:

    I'm not sure exactly why but this web site is loading incredibly slow for me.
    Is anyone else having this issue or is it a problem on my end?
    I'll check back later on and see if the problem still exists.

    1. Paul says:

      Hi just ran a speed test and seems to be running as normal.!/PSCrj/

      Let me know if you spot this again.