I am getting a base64 encoded JPEG string via a POST request to my web service. I want to decode it and save it in the filesystem. How can I achieve this using PHP 5.3. I am
Replacing the blank spaces with + signs is required if the data is derived from canvas.toDataURL() function.
$encodedString = str_replace(' ','+',$encodedString);
See this question
It helped a lot in my case.