PECL Tidy extension for Windows

Frank Kromann [1] was kind enough to build the Tidy PECL extension [2] for PHP. He will make the dll available online with the next build cycle. The first step into Tidy used via PHP could be the following:

<?php
// 1. http://kromann.info/php4-pear/php_tidy.dll
// 2. libtidy.dll to c:\\winnt\\system32; get it from http://htmltrim.sf.net
// 3. php.ini: extension=php_tidy.dll
// 4. Start with:
// – http://cvs.php.net/cvs.php/pecl/tidy/tests
// – http://coggeshall.org/show_source.php?filename=cleanhtml.php

print_r(get_extension_funcs(\’tidy\’));
?>

This produces the currently available functions in this extension:

Array
(
 [0] => tidy_create
 [1] => tidy_setopt
 [2] => tidy_getopt
 [3] => tidy_parse_string
 [4] => tidy_parse_file
 [5] => tidy_get_output
 [6] => tidy_get_error_buffer
 [7] => tidy_clean_repair
 [8] => tidy_diagnose
 [9] => tidy_get_release
 [10] => tidy_get_status
 [11] => tidy_get_html_ver
 [12] => tidy_is_xhtml
 [13] => tidy_is_xml
 [14] => tidy_error_count
 [15] => tidy_warning_count
 [16] => tidy_access_count
 [17] => tidy_config_count
 [18] => tidy_load_config
 [19] => tidy_load_config_enc
 [20] => tidy_set_encoding
 [21] => tidy_save_config
)

Credits to John [3] for implementing Tidy.

[1] http://kromann.info/pear-pecl.php
[2] http://pear.php.net/package-info.php?package=tidy
[3] http://coggeshall.org

Leave a Reply