Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/teamcfadvance/irreversibleurlshortener
Provides functions for generating an irreversible key of variable length to be used as a shortened URL variable.
https://github.com/teamcfadvance/irreversibleurlshortener
Last synced: about 2 months ago
JSON representation
Provides functions for generating an irreversible key of variable length to be used as a shortened URL variable.
- Host: GitHub
- URL: https://github.com/teamcfadvance/irreversibleurlshortener
- Owner: teamcfadvance
- License: apache-2.0
- Created: 2014-02-08T11:54:17.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-02-12T15:36:07.000Z (almost 11 years ago)
- Last Synced: 2024-03-26T00:00:06.381Z (9 months ago)
- Language: ColdFusion
- Size: 202 KB
- Stars: 4
- Watchers: 8
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
IrreversibleURLShortener
========================Provides functions for generating an irreversible key of variable length to be used as a shortened URL variable. In response to a question in the [TACFUG google group](https://groups.google.com/forum/#!msg/tacfug/d4mFhPLzFUU/ezbeMV539XkJ), I have created this project to demonstrate a few ways in which to generate shortened URL variables to use in place of longer (e.g. CreateUUID()) variables.
This package relies on having a database table with a column that stores the generated keys produced by this code. As such, this package includes two CFC's:
* Datasource.cfc
* IrreversibleURLShortener.cfcThe Datasource.cfc is consumed (required) by the IrreversibleURLShortener.cfc.
--------------
To use, first initialize the datasource model/bean and the IrrversibleURLShortener component:
```ColdFusion
```
-----------
Then, call the method passing in the [table] and [column] that stores the key to check the existence of in the database, optionally specifying the length of the generated key (6 chars by default) using one of the available methods (hash, aplha, alphanum or numeric, 'hash' by default):
```ColdFusion
```
**OR**
```ColdFusion
```
**OR**
```ColdFusion
```
**OR**
```ColdFusion
```
------------
**DEMO**
This package now also includes a demonstration index.cfm, an Application.cfc where default values are defined, and a MySQL script to generate the demo table used.
[You can also view a live demo of this code](http://css.dvdmenubacks.com/IUSDemo/)