update page now
Longhorn PHP 2026 - Call For Papers

Voting

: eight plus zero?
(Example: nine)

The Note You're Voting On

gutzmer at usa dot net
15 years ago
For anyone interested in the 'base64url' variant encoding, you can use this pair of functions:

<?php
function base64url_encode($data) {
  return rtrim(strtr(base64_encode($data), '+/', '-_'), '=');
}

function base64url_decode($data) {
  return base64_decode(str_pad(strtr($data, '-_', '+/'), strlen($data) % 4, '=', STR_PAD_RIGHT));
}
?>

<< Back to user notes page

To Top