PHP code example of olegf13 / base64url

1. Go to this page and download the library: Download olegf13/base64url library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

olegf13 / base64url example snippets



use Olegf13\Base64URL;

$inputString = '????SlashAndPlus>>>';
$encodedString = Base64URL::encode($inputString);
echo $encodedString, \PHP_EOL; // "Pz8_P1NsYXNoQW5kUGx1cz4-Pg"
echo Base64URL::decode($encodedString), \PHP_EOL; // "????SlashAndPlus>>>"