Joke Collection Website - Blessing messages - Base64 SMS decoding

Base64 SMS decoding

If the encoding used by the server pages at both ends is inconsistent, it will lead to garbled codes.

As you said, the content sent by another server is encoded by GBK. If the encoding used by your local PHP is not GBK, garbled code will appear.

2 solutions:

Change the page encoding to GBK (you can use the title ('content-type: text/html charset = GBK'); )

Convert the GBK encoding into the current page encoding (assuming that the current page is utf-8), you can use ICONV ('GBK',' UTF-8', $ content); Where $content is the string decoded by urldecode and base64.