I'm using AS3 to base64 encode a JPG and pass it to Javascript. I'm attempting to use AJAX to pass that base64 encoded string to PHP and have PHP decode it. (I know I could send it back to Flash and Flash could decode it and send it to PHP, but I'm trying to eliminate the need for Flash on the decoding end).
It appears that AS3's encodeToBase64String()
function and and PHP's base64_decode()
function do not use the same algorithm, as PHP evaluates it as a base64 encoded object, but does not seem to output it properly.
Is there a way to rectify this problem?
Note: Please no posts about not needing Javascript. Javascript is a necessary step for reasons not detailed here.