PHP code example of selective / base32
1. Go to this page and download the library: Download selective/base32 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/ */
selective / base32 example snippets
use Selective\Base32\Base32;
$str = 'abc 1234';
$base32 = new Base32();
// Encode
// MFRGGIBRGIZTI====
$encoded = $base32->encode($str);
// Decode
// abc 1234
echo $base32->decode($encoded);
$str = 'abc 1234';
// Encode
$encoded = $base32->encode($str, false);
// mfrggibrgizti
$encoded = strtolower($enc);
// Decode
echo $base32->decode($encoded);