2017 © Pedro Peláez
 

library php-short-id

Short ID generator. The library help you generate short id like youtube, vimeo, bit.ly, etc.

image

gerlovsky/php-short-id

Short ID generator. The library help you generate short id like youtube, vimeo, bit.ly, etc.

  • Monday, May 28, 2018
  • by gerlovsky
  • Repository
  • 1 Watchers
  • 2 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 100 % Grown

The README.md

PHP Short ID creator

Build Status, (*1)

The library help you generate short id like youtube, vimeo, bit.ly, etc. Short generation (creation) based on numerical ID., (*2)

Simple scenarios of using

require('vendor/autoload.php');

$shortId = new \Gerlovsky\ShortId\ShortId();

Creating short ID for a record from in a database

  1. when an app created a record in an your database with ID 20956
  2. $shortId->encode(20956) encodes it to 'bfrE'
  3. you updated the record for ID 20956 and set short_id of the record to 'bfrE'
$id = $shortId->encode(20956);     // $id will be 'bfrE'

// or with $length = 6
$id = $shortId->encode(20956, 6);  // $id will be 'baauC6'

The Versions

28/05 2018

dev-master

9999999-dev https://github.com/Gerlovsky/php-short-id

Short ID generator. The library help you generate short id like youtube, vimeo, bit.ly, etc.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Gerlovsky Ruslan

28/05 2018

1.0

1.0.0.0 https://github.com/Gerlovsky/php-short-id

Short ID generator. The library help you generate short id like youtube, vimeo, bit.ly, etc.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Gerlovsky Ruslan