Skip to content

soleimanpour/toolkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Soleimanpour/Toolkit

This package provides utility functions for generating short, unique URLs and converting numbers to different bases (up to base 62). It is particularly useful for URL shortening and creating unique identifiers.

Features

  • generate_short_url($input): This function generates a short unique string based on the input and the current time.

  • to_base($number, $base): This function converts a given number to a specified base, with support for up to base 62.

Installation

You can install the package via Composer:

composer require soleimanpour/toolkit

Usage

Example 1: Generating a short URL

echo generate_short_url('myinput');  // Example output: 4z1f7G3JkN

Example 2: Converting a number to base 62

echo to_base(123456, 62);  // Example output: W7e

License

This package is open-source software licensed under the MIT license.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages