rhymix/classes/security/phphtmlparser/src/ex_html2text.php
2012-08-13 02:19:17 +00:00

18 lines
485 B
PHP
Executable file

<?
// Example: html2text
// Converts HTML to formatted ASCII text.
// Run with: php < ex_html2text.php
include ("html2text.inc");
$htmlText = "Html2text is a tool that allows you to<br>" .
"convert HTML to text.<p>" .
"Does it work?";
$htmlToText = new Html2Text ($htmlText, 15);
$text = $htmlToText->convert();
echo "Conversion follows:\r\n";
echo "-------------------\r\n";
echo $text;
?>