You can make base64 web safe code:
// encode $email_encoded = rtrim(strtr(base64_encode($email), '+/', '-_'), '='); // decode $email_decoded = base64_decode(strtr($email_encoded, '-_', '+/'));
It converts + and / from base64 alphabet to safer - and _ . The encoding step also removes trailing = characters if necessary.
Ja͢ck source share