2017 © Pedro Peláez
 

library googl

Google URL Shortener API in PHP

image

oleander/googl

Google URL Shortener API in PHP

  • Wednesday, August 13, 2014
  • by oleander
  • Repository
  • 1 Watchers
  • 3 Stars
  • 48 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 2 % Grown

The README.md

Googl

Google URL shortener API in PHP, (*1)

Usage

Shorten url

``` php $client = new Googl\Base("username@gmail.com", "password"); $url = $client->shorten("http://www.bbc.co.uk/"); echo $url->short; # => "http://goo.gl/wZts", (*2)


Your url should now be visible at [http://goo.gl/](http://goo.gl/). ### Expand url ``` php $long = Googl\Base::expand("http://goo.gl/wZts"); echo $url->original; # => "http://www.bbc.co.uk/"

Install

Without Composer

Clone the project using git clone https://github.com/oleander/googl-php and include the source file with require_once("googl-php/src/Googl.class.php");, (*3)

With Composer

Add the following json to your composer.json file and run composer update., (*4)

{
  "require" : {
    "oleander/googl" : "dev-master"
  }
}

Test

Tests can be found in the tests folder and executed by running USER="username@gmail.com" PASSWORD="gmail-password" phpunit. Don't forget to run composer update before you run the test suite., (*5)

Contributing

  1. Fork it ( http://github.com/oleander/googl-php/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

The Versions

13/08 2014

dev-master

9999999-dev https://github.com/oleander/googl-php

Google URL Shortener API in PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

googl goo.gl