I have a base64 encoded string that I would like to convert into an image in PHP / HTML.
Here is what I have:
$data = \"R0lGODdhAAGAAKIAAP38+/3h3cj
Stupid question: is the mime-type correct?? is your base64 code represent a gif file????
this is an example using a image/png, without php, just html, and it works:
Just try it.
Now, the same base64 code using the php exemplified above but using the proper mime-type (image/png):
";
?>
So, this is the code:
echo "
";
Notice, since I am using double quotes for the echo tag, I have to tell php to ignore the ones inside the img tag. Other than that, you are good
cheers
PC