WorldWideScripts.net Delivering the best Add-Ons in more than 37 languages.

中文(简体), English, हिन्दी/हिंदी, Español/Castellano, العربية, Русский язык, Français, 中文 (台灣), বাংলা, Bahasa Indonesia, اردو, Português, Deutsch, Bahasa Melayu (بهاس ملايو‎), 日本語 (にほんご), فارسی, Italiano, తెలుగు, Türkçe, ગુજરાતી, Język polski/polszczyzna, Tiếng Việt, ಕನ್ನಡ, Українська мова, ไทย
PHP Scripts / Miscellaneous

PHP Bit.ly Plugin

— Add-On to WorldWideScripts.net

Subscribe to our feed to stay up to date!

New! Follow us as you want it!


PHP Bit.ly Plugin - CodeCanyon Item for Sale

Ads

Ad: Bluehost hosting

The bit.ly plugin interacts with the bit.ly 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 bit.ly and j.mp links.

Shorten Links

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

 echo $bitly->shorten('http://google.com'); 


Result: http://bit.ly/grqpfX

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

 echo $bitly->shorten('http://google.com', $service='bit.ly', $qr=true); 


Result


Expand Links

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

 echo $bitly->expand('http://bit.ly/grqpfX'); 


Result: http://google.com

Bitly Stats

Use this to get the click stats for bit.ly or j.mp 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 sublantic.net). Additionally you can enter “both” and it will return an array inluding both user and global click stats.

 $stats = $bitly->stats('http://bit.ly/grqpfX', $type='both'); $stats['user']; // User link clicks $stats['global']; // Global link clicks 


Result

Clicks on http://bit.ly/grqpfX: 3
Clicks on all links pointing to http://google.com: 1483

More Files From the PHP Plugin Suite

Image Plugin

Twitter Plugin

Video Plugin

Weather Plugin

Map + Weather Plugin


pose css


Download
Other components in this categoryAll components of this author
CommentsFrequently asked questions and answers

Properties

Created:
27 January 11

Last Update:
N/A

High Resolution:
No

Compatible Browsers:
IE6, IE7, IE8, Safari, Opera

Files Included:
PHP

Software Framework:
CodeIgniter

Software Version:
PHP 5.x, PHP 5.0 - 5.2, PHP 5.3

Keywords

eCommerce, All Items, bit.ly, codeigniter, j.mp, php, url shortener