Reply to Re: email processing script, need help trying to catch =0D and =5f encoded characters

Your name:

Reply:


Posted by Mike Scougall on 10/10/06 11:39

<chris_fieldhouse@hotmail.com> wrote in message
news:1139412284.395848.305720@o13g2000cwo.googlegroups.com...
> Hi,
>
> I have a script for processing emails,
> The script finds email sent to a particular alias, grabs the body text
> of the email and stores it into a database.
>
> Problem is that certain character like '_' sometimes get stored as =5F,
> and some email clients seem to add in =0D encoded characters.
>
> I store the text in an Mysql database, and depending on the message
> type I also set a flag to indicate whether its a plain text message, or
> a MIME message with HTML coding.
> Its alwasy the HTML messages that have the extra characters.
>
> here is the code segment I modified from php.net to break down the
> email structure and grab just the body text (not interested in storring
> any attachments).
>
> Any help would be appreciated.
>

You could try using addslashes($content) just before writing the string to
the DB. Use stripslashes() when you pull the string back out.

There are also strip_tags() and htmlspecialchars() functions that strip out
or convert HTML and PHP tags. You might find one of those useful.

HTH

------------------------------------
Mike S
Copywriting for the IT Professional
www.redmaplesoftware.com

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация