=?UTF-8?B?0JrQuNGA0LjQu9C70LjRhtCwINC+0L3QsCDRgtCw0LrQsNGP?=
Не пойму как её декодировать
Пробовал это:
//echo utf8_decode($string)."\n";
//echo base64_decode($string)."\n";
//echo html_entity_decode($string)."\n";
//echo utf8_decode($string)."\n";
//echo base64_decode($string)."\n";
//echo html_entity_decode($string)."\n";
Цитата (twin @ 31.01.2016 - 14:07) |
iconv_mime_decode() |
$struct = imap_fetchstructure($imap,$mail_id);
$type=$struct->type;
$encoding=$struct->encoding;
$charset_body=$struct->parameters[0]->value;
$body = imap_fetchbody($imap,$mail_id,1);
if($type=="0")
{
if($encoding=="4")
{
$text_body=imap_qprint($body);
}
if($encoding=="3")
{
$text_body=imap_base64($body);
}
if($encoding=="2")
{
$text_body=$body;
}
if($encoding=="1")
{
$text_body=$body;
}
$text_body=iconv($charset_body, "UTF-8", $text_body); //приводим всё к одной кодировке
echo $text_body;
}
else
{
echo "не могу прочитать";
}