dev-master
9999999-dev https://github.com/oleander/googl-phpGoogle URL Shortener API in PHP
MIT
The Requires
- php >=5.3.3
The Development Requires
googl goo.gl
Wallogit.com
2017 © Pedro Peláez
Google URL Shortener API in PHP
Google URL shortener API in PHP, (*1)
``` 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/"
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)
Add the following json to your composer.json file and run composer update., (*4)
{
"require" : {
"oleander/googl" : "dev-master"
}
}
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)
git checkout -b my-new-feature)git commit -am 'Add some feature')git push origin my-new-feature)Google URL Shortener API in PHP
MIT
googl goo.gl