http://au.php.net/tidy
See example two: Basic Tidy Usage.... On 5/25/05, Matthew Davidson <[EMAIL PROTECTED]> wrote: > Hi, > > I want to manipulate some HTML code with PHP, and it appears the tidy > extension is the way to do it. I have installed everything by the book: > > # apt-get install libtidy0 libtidy-dev > # pear -v install tidy > > and added 'extension=tidy.so' to php.ini. > > phpinfo() reports that the extension is loaded. > > Unfortunately, this: > > <?php > $tidy = > tidy_parse_string('<html><head><title>Test</title><body><h1>test</h1></body></html>'); > ?> > > causes PHP to segfault, when run from both apache and the command line. > Any other test string I've tried does the same thing, as does > tidy_parse_file(). > > Some other functions, such as tidy_get_config() don't cause a segfault > (and actually work as advertised), unfortunately these are the functions > that don't actually do anything useful. > > I am running Debian Sarge, php4, and apache 1.3. > > What am I doing wrong? > > Matthew. > > -- > Alma Technology > http://www.almatech.net.au > (02) 6658 1607 ... 0419 242 316 > -- > "...running an application in a browser is no longer like writing > with a brick tied to [your] pencil." - Mitch Kapor > -- > SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ > Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html > -- Menno Schaaf aka ginji irc.austnet.org #gentoo #linux-help irc.ifirc.net #linux -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html