PHPackages                             chocopoche/short\_url - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. chocopoche/short\_url

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

chocopoche/short\_url
=====================

Yet another short url app!

v1.0.0(13y ago)24[2 issues](https://github.com/chocopoche/short_url/issues)MITJavaScript

Since Apr 3Pushed 13y ago1 watchersCompare

[ Source](https://github.com/chocopoche/short_url)[ Packagist](https://packagist.org/packages/chocopoche/short_url)[ RSS](/packages/chocopoche-short-url/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (10)Versions (2)Used By (0)

Url shortener application
=========================

[](#url-shortener-application)

[![Build Status](https://camo.githubusercontent.com/ed5408c89ab6458760966335e8b4dae864d5afbd19f3fb68261f26928e3bb4f9/68747470733a2f2f7472617669732d63692e6f72672f63686f636f706f6368652f73686f72745f75726c2e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/chocopoche/short_url)

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

Install
-------

[](#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](https://code.google.com/apis/console/).

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

Features
--------

[](#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

The resulting integer is then mapped with a bijective algorithm that uses a configurable alphabet. Those functions are pasted from .

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).

- /{short\_code} redirects to the long url
- /{short\_code}.png shows a QR Code
- /{short\_code}/details shows the details available for the shortened url
- /last/ redirects to the last shortened url
- /shorten/ usefull with the help of the javascript bookmarklet
- /mine/ When you are authenticated, shorten urls will be associated with your account and you'll be able to see your last shorten urls.

**Bookmarklet**

HTML code to generate a link:

```
Shorten

```

Or just add a bookmark with the following url:

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

```

Live demo
---------

[](#live-demo)

A live demo is available at [tmb.io](http://tmb.io).

API Doc
-------

[](#api-doc)

Available at [tmb.io/doc/](http://tmb.io/doc/).

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4836d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/223746054f3674289017723cf8b0876d2170dfc06f1cf564e468f15804d629bb?d=identicon)[chocopoche](/maintainers/chocopoche)

---

Top Contributors

[![cmerot](https://avatars.githubusercontent.com/u/138213?v=4)](https://github.com/cmerot "cmerot (26 commits)")

### Embed Badge

![Health badge](/badges/chocopoche-short-url/health.svg)

```
[![Health](https://phpackages.com/badges/chocopoche-short-url/health.svg)](https://phpackages.com/packages/chocopoche-short-url)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.5M378](/packages/easycorp-easyadmin-bundle)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M196](/packages/sulu-sulu)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M524](/packages/shopware-core)[chameleon-system/chameleon-base

The Chameleon System core.

1027.9k4](/packages/chameleon-system-chameleon-base)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9417.2k55](/packages/open-dxp-opendxp)[oro/platform

Business Application Platform (BAP)

642140.7k104](/packages/oro-platform)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
