Google URL Shortener

Ramkumar Sankarpandi edited this page Sep 3, 2013 · 4 revisions
Clone this wiki locally

Google URL Shortener API Class for Codeigniter


Google URL Shortener library for CodeIgniter


Usage:

$apiKey = "<< Your Google API Key >>";
//load the library
$this->load->library('GoogleURL');
//initialize with the google API Key
$this->googleurl->_initialize($apiKey);
//for shortening 
echo $this->googleurl->shorten('http://www.google.com');
//for expanding
echo $this->googleurl->expand('http://googl.com/FgFHGf');
    ```