Skip to content

Instantly share code, notes, and snippets.

Created Oct 8, 2021
What would you like to do?
URL shortner without storage
composer require "tuupola/base85:^1.0"
$url = ""
$base85 = new Tuupola\Base85;
$tokenized = $base85->encode($url);
$shortened = "$tokenized";
print("The URL $url, is shorthened to $shortened");
$long = array_pop(explode('/', $shortened));
print("redirecting to: $long")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment