I have a SOAP client in PHP that makes calls to a WSDL service. One of the functions returns a base64binary data. I've been trying to decode it without any luck.
base64_decode($encoded_base64data) will not work. I tried using base_convert() and mv_convert_encoding() with various parameters, but could not get a proper result.
The encoded result data starts with:
��`I�%&/m�{J�J��t��`$ؐ@�������iG#)�*��eVe]f@�흼��{����{����;�N'���?\fdl��J�ɞ!���?~|?"
(the data is much longer, this is just a small portion of the string)
Any idea how it could be done?
Thanks
EDIT
I've extended the SoapClient with a new __doRequest() method to check that the received data is a proper base64 string. I got a proper base64 encoded string, and the result shown above is the decoded response.
Anyhow, the string was decoded automatically by the SoapClient from base64 to binary (as @hakre suggested), so I only have to deal with the binary response.
Now what I need is to decode the binary string into something that would look like a readable format. The final response should contain Georgian output, so I'm trying to figure out the original encoding (but that's a different question).