Welcome Guest, Not a member yet? Register   Sign In
Goo.gl helper - A goo.gl shortener
#1

[eluser]Isern Palaus[/eluser]
Goo.gl helper

I'm planning to release a e-Commerce system I coded in CodeIgniter in open-source so I've to familiarize with the public tools like Git/Bitbucket. I decided to create a profile and try with a simplest repository and here it's: codeigniter-googl-helper (with the name convention proposed by jamierumbelow).



You can grab the latest version in codeigniter-googl-helper at bitbucket or with a direct link to a zip file.

The usage is very simple: you need to load the helper and run the function googl_url().

Code:
$this->load->helper('googl');

$url = 'http://blog.ipalaus.es';

$short_url = googl_url($url);


You can optionally pass a second boolean (TRUE/FALSE) parameter to return the original URL if something goes wrong. Default is TRUE (will return the long url):

Code:
$short_url = googl_url($url, FALSE);



This is based in ggl-shortner by Matthew Flaschen.




Theme © iAndrew 2016 - Forum software by © MyBB