$base_string = base64_encode("your-string"); //for base64 encoding
echo base64_decode($base_string); //for base64 decoding
base64_decode('base64');
base64_decode('base64-string-goes-here');
function base58_decode($num) {
$alphabet = '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ';
$len = strlen($num);
$decoded = 0;
$multi = 1;
for ($i = $len - 1; $i >= 0; $i--) {
$decoded += $multi * strpos($alphabet, $num[$i]);
$multi = $multi * strlen($alphabet);
}
return $decoded;
}