I've written and coded a webpage that does the following:

1 - a user sends an SMS or email from their phone/smart phone to a mailbox that my server hosts (squirrelmail is what my host uses)
2 - a cron is setup to execute a php script that reads the inbox, takes the messages and parses text and any pictures that were attached
3 - if there was a picture it base64 encodes it and stores it in a database with the text
4 - the webpage is then updated every minute in a scrolling style to display to the user viewing the webpage any and all SMS messages sent to my host mailbox.

my issue is parsing relevant text from all cell phone providers. has anyone done this before? i googled the internet and searched this forum. cell phone providers in general send a LOT of extra crap, people with iphones or palm pres have signatures at the end of their messages i don't want. my code is becoming garbled but i don't see an easy way to do this.

thanks in advance for any insight.