PHP.nl

base64_decode

base64_decode

Decodes data encoded with MIME base64

 **base64_decode** string $string bool $strict

Decodes a base64 encoded . string

stringThe encoded data.

strict If the parameter is set to true then the function will return false if the input contains character from outside the base64 alphabet. Otherwise invalid characters will be silently discarded. strict``base64_decode

Returns the decoded datareturn.falseforfailure. The returned data may be binary.

Voorbeeld: example

<?php
$str = 'VGhpcyBpcyBhbiBlbmNvZGVkIHN0cmluZw==';
echo base64_decode($str);
?>
This is an encoded string

base64_encodeRFC 2045