Command Line URL Shortener and Expander
PHP
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
src/Urly
tests
.gitignore
CHANGELOG.md
README.md
composer.json
composer.lock
phpunit.xml
portkey.json

README.md

Urly

Commandline URL Shortener and Expander

Urly shortens URLs using the bit.ly api and expands any short URL into it's longform using the longform.org api.

It was written to illustrate Dependency Injection in Encase.

Usage

To shorten any URL use the --shorten option or it's shorter version -s.

$ bin/urly --shorten http://long-url-here.com

And to expand a shortened url use the --expand option or it's shorter version -e.

$ bin/urly --expand http://short.url

Requirements

You'll need to create 2 Environment Variables before you can use urly.

  1. BITLY_API_KEY - Your bitly api key.
  2. BITLY_LOGIN - Your bitly login name.

You can do this on the commandline using the shell built-in export.

export BITLY_API_KEY=your_key
export BITLY_LOGIN=your_login

License

MIT License. Copyright © 2014 Darshan Sawardekar