Re: IMAP functions help
| From: | Danny Shepherd | Date: | Mon, 17 Jun 2002 13:40:59 +0000 |
| Subject: | Re: IMAP functions help | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-102509@lists.php.net to get a copy of this message | ||
Of course, you could always just go with imap_qprint() or
quoted_printable_decode() :)
Danny.
----- Original Message -----
From: "Danny Shepherd" <danny@kyboshed.com>
To: "PHP-General" <php-general@lists.php.net>
Sent: Monday, June 17, 2002 2:12 PM
Subject: Fw: [PHP] IMAP functions help
> This should do it
>
> <?php
>
> function QPDecode($string)
> {
> return preg_replace_callback("/=(.{2})/", 'myCallback', $string);
> }
>
> function myCallback($match)
> {
> return chr(hexdec($match[1]));
> }
>
>
> $string ="The total price =3D =A3500";
>
> echo QPDecode($string);
>
> ?>
>
> ----- Original Message -----
> From: "Matthew Ward" <email@inspirationstudios.co.uk>
> To: <php-general@lists.php.net>
> Sent: Monday, June 17, 2002 1:53 PM
> Subject: Re: [PHP] IMAP functions help
>
>
> > So what function do I use to convert these ASCII codes back into their
> > original characters?
> >
> > "Danny Shepherd" <danny@kyboshed.com> wrote in message
> > news:00a101c215fd$78b1e9b0$6400a8c0@DANNYS...
> >
> > > Same thing as above =3D is ASCII for '='. 20 is ASCII for newline.
> > >
> > > HTH
> > >
> > > Danny.
> > >
> > >
> > >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>