Skip to content
Advertisement

Decode base64 mixed with html In PHP

I’m using base64_decode in php in order to decode a message content. My message content is mixed with html, english and base64 encoding

Is there any way to decode the message to plain html?

example:

 <div dir=3D"ltr">
   <div dir=3D"rtl">=D7=94=D7=90=D7=9D =D7=99=D7=A9 =D7=97=D7=
=93=D7=A9 =D7=91=D7=A0=D7=95=D7=A9=D7=90?<br clear=3D"all"></div> 
   <div>DNS ==D7=9B=D7=91=D7=A8 =D7=A2=D7=95=D7=93=D7=9B=D7=9F.</div>
 </div>

Advertisement

Answer

found the simple solution, used two decoding methods.

  quoted_printable_decode(base64_decode($trim4));
  quoted_printable_decode($trim4);
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement