How to set character limit in base64 encoder

0

I have this little system:

<?php
    if (!empty($_POST)) {
        extract($_POST);
        $urlEncode = base64($url);
    }
?>

this system I encrypt a url. ex: I put in an input: link

it returns encrypted: L1lrYmEvenIrNUthUW4ydHJGUEI4S0p0bGJvNGxnOD0=heTN6RCtHcUVHZjM

That's fine, but how do I make it small? ex only:

https://google.com para -> W4ydHJGUEI
    
asked by anonymous 11.04.2018 / 21:12

0 answers