Download the PHP package chocopoche/short_url without Composer

On this page you can find all versions of the php package chocopoche/short_url. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package short_url

Url shortener application

Build Status

Yet another url shortener built for Silex's PHP framework!

Install

First, install the package and its dependencies:

$ git clone https://github.com/chocopoche/short_url.git
$ cd short_url
$ curl -sS https://getcomposer.org/installer | php
$ php composer.phar update

You may have to fix perms on the vendor/google directory, as its not world readable after extracting the tarball.

$ chmod -R a+rX vendor/google

Then creates the database, here is how to do so with an sqlite database:

$ app/console db:create
$ app/console db:import-schema

To run tests:

$ vendor/bin/phpunit

To let users authenticate themselves to keep track of their urls, enable Google OAuth2 by creating an application on the console.

Configure your database in app/bootstrap.php and your GoogleOAuth client id and secret in config/app.php.

Features

Url slugs are generated with the SQL row id integer, which is hashed with a bidirectional encryption (Feistel cipher) that maps the integer space onto itself. Pasted from https://gist.github.com/baldurrensch/3710618

The resulting integer is then mapped with a bijective algorithm that uses a configurable alphabet. Those functions are pasted from http://www.flickr.com/groups/api/discuss/72157616713786392/.

This way there is no need to store the short code in the database, and the short codes generated are not obvious to decode just by reading them (I mean you can't just increment the string to find the next record).

Bookmarklet

HTML code to generate a link:

<a href="javascript:location='http://tmb.io/shorten/?url='+encodeURIComponent(location.href); void 0" class="btn btn-success">Shorten</a>

Or just add a bookmark with the following url:

javascript:location='http://tmb.io/shorten/?url='+encodeURIComponent(location.href); void 0

Live demo

A live demo is available at tmb.io.

API Doc

Available at tmb.io/doc/.


All versions of short_url with dependencies

PHP Build Version
Package Version
Requires aferrandini/phpqrcode Version dev-master
doctrine/dbal Version 2.2.*
google/google-api-php-client Version 0.6.*
silex/silex Version 1.0.*@dev
twig/twig Version >=1.8,<2.0-dev
symfony/form Version ~2.1
symfony/validator Version ~2.1
symfony/config Version ~2.1
symfony/translation Version ~2.1
symfony/twig-bridge Version ~2.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package chocopoche/short_url contains the following files

Loading the files please wait ...