Convert HTML to Text with PHP-4OverviewThis example is part of the project titled HTML Parser for PHP-4. It's a class namedHtml2Text which
converts HTML to ASCII text, while attempting to
preserve page formatting.
RequirementsTested with PHP 4.0.4. It should work with PHP 4.0.3+.DownloadThe latest version is available at SourceForge's download area for this project.LimitationsPerhaps the most relevant limitations of the latest version of this simple tool are that it ignores tables and that it does not center.AuthorThe HTML Parser for PHP-4 and this example were written by Jose Solorzano of Starnetsys, LLC. (If you need a website or program developed professionally, affordably, and on time, be sure to contact starnetsys.com.)Usage TipsYou only need to copysrc/htmlparser.inc
and src/html2text.inc to a location in your
codebase where you'd like to be able to include them.
The PHP file that uses this conversion tool could
look like this:
Feedback
|