Skip to content

mongeslani/kohana-google-shorten

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

KO3 Google URL Shortener API Wrapper

Just a simple google URL shortener API wrapper.

To Use

  1. Copy the module in your Modules directory
  2. Include it in your application's bootstrap: 'kohana-google-shorten' => MODPATH.'kohana-google-shorten'
  3. Optional step: get your API key, read here
  4. Checkout sample codes below:

Sample Code

** Shorten URLs **

	$key = ''; // your API key, optional
	$longUrl = 'http://www.mongeslani.com';
	$shortUrl = shorten::shorten($longUrl, $key);

** Expand shortened URLs **

	$key = ''; // your API key, optional
	$shortUrl = 'http://goo.gl/N4mCb';
	$longUrl = shorten::expand($shortUrl, $key);

** Get Analytics for the shortened URLs **

	$key = ''; // your API key, optional
	$shortUrl = 'http://goo.gl/N4mCb';
	$longUrl = shorten::expand($shortUrl, $key, TRUE); // same as expanding but with additional parameter

Issues

Please report it to the issues tracker.

About

Google Shortener API Wrapper for KohanaPHP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages