Is there a base64_encode function that is URL safe in PHP?
It also needs to be decodable obviously.
Thanks for your help!
Is there a base64_encode function that is URL safe in PHP?
It also needs to be decodable obviously.
Thanks for your help!
No. There isn't one built-in.
You can simply do this,
$encoded = strtr(base64_encode($data), '+/=', '-_.');
$data = base64_decode(strtr($encoded, '-_.', '+/='));