PHP  Plugin

PHP Plugin


The plugin interacts with the api allowing you to easily shorten urls, decode short links (to determine where they point), and find out how many times a link has been clicked. It can also generate QR code images as opposed to standard links. Works with both and links.

Use this function to get the short link for a particular URL. It creates links by default, but works with api as well.

echo $bitly->shorten('');


Additionally, you can return a qr code instead of a text link like so:

echo $bitly->shorten('', $service='', $qr=true);

PHP Plugin - 1

This function will “expand” or links and retrieve the long url that they point to.

echo $bitly->expand('');


Bitly Stats

Use this to get the click stats for or links. By default it will get the number of clicks on just your short link. However, if you pass “global” after the link it will get the number of clicks from all links pointing to the long url (in this case Additionally you can enter “both” and it will return an array inluding both user and global click stats.

$stats = $bitly->stats('', $type='both');
$stats['user']; // User link clicks
$stats['global']; // Global link clicks


Clicks on 3
Clicks on all links pointing to 1483

More Files From the PHP Plugin Suite

Image Plugin

Twitter Plugin

Video Plugin

Weather Plugin

Map + Weather Plugin

pose css


Author Image