2 April 2010
I was looking for an open-source script that would convert HTML into plain text (not markup), for use in automatically creating the alternate body of e-mails. After some investigation on StackOverflow, I found two html2text implementations (one, two), but both of them were non-commercially licensed.
So I have created a very simple implementation of html2text licensed under the Eclipse Public License (which can be used commercially).
It uses PHP's DOM methods to load from HTML, and then iterates over the resulting DOM to correctly output plain text. Example output: HTML to plain text
It's not complete yet but it's open source and contributions are welcome.