Skip to content

Google URL Shortener

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

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');
    ```
Clone this wiki locally