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
[eltd_button size=”huge-full-width” type=”outline” text=”Download & Demo Links” custom_class=”#” icon_pack=”font_awesome” fa_icon=”” link=”” target=”_blank” color=”” hover_color=”” background_color=”” hover_background_color=”” border_color=”” hover_border_color=”” font_size=”” font_weight=”” margin=””]
Demo = PHP Bit.ly Plugin
[eltd_button size=”huge” type=”” text=”Full Live Demo” custom_class=”” icon_pack=”font_awesome” fa_icon=”fa-laptop” link=”https://codecanyon.net/item/php-bitly-plugin/156153″ target=”_blank” color=”” hover_color=”” background_color=”” hover_background_color=”” border_color=”” hover_border_color=”” font_size=”” font_weight=”” margin=””]
Kindly Note: We update new contents like WordPress Themes, Plugins, PHP Scripts everyday. But remember that you should never use this items in a commercial website. All the contents posted here for development & testing purpose only. We’re not responsible for any damage, use at your own RISK! We highly recommend to buy PHP Bit.ly Plugin from the The Developer ( sublantic ) website. Thank you.
Download = PHP Bit.ly Plugin-[Updated].zip