Here is my code:
$img data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2w..........
file_put_contents('myimage.txt',$img);
file_put_contents('myimage.jpeg', base64_decode($img));
Here is the Output I get:
90KB myimage.txt file
0bytes myimage.jpeg file
I tested the text filehere: Here and it seems to be working. Thanks for the help!
Apache 2.2.23