PHP base64_decode! "@" comes out as "¡"

I take the code from email (google) and it translates the code or encrypts it when I use the @ symbol, which it changes, and an inverted explanatory point. ¡I use the code below and it fixes it to @, but it adds "?" and the end or "n". It also changes the $ character to funky. Any ideas how to decode this correctly? Again, this is Google encryption. I don't know if this helps ...

$Body = base64_decode($Body); $Body = mb_convert_encoding($Body, "utf-8"); $Body = htmlspecialchars($Body); $Body = preg_replace('/¡/',"@",$Body); 
+4
source share
1 answer

I use this to retrieve my email body from gmail.

 $body = imap_fetchbody($inbox, $mail, 1); $body = quoted_printable_decode($body); $body = urldecode($body); 

And it works well

0
source

Source: https://habr.com/ru/post/1384546/


All Articles