test bogus'; if (isset($_GET['yourhtml'])) { $html=str_replace('+',' ',urldecode($_GET['yourhtml'])); } else if (isset($_POST['yourhtml'])) { $html=str_replace('+',' ',urldecode($_POST['yourhtml'])); } if (function_exists('tidy_parse_string')) { try { $tidy = tidy_parse_string($html); } catch (Exception $ex) { $there=false; } } else { $there=false; } //echo tidy_error_count($tidy) . "\n"; //1 //echo tidy_warning_count($tidy) . "\n"; //5 if (!$there && strpos($_SERVER['SERVER_NAME'], 'localhost') === false) { echo "Using tidy

Using tidy

RJM Programming - March, 2022 - Thanks to https://www.php.net/manual/en/function.tidy-warning-count.php
Mac OS X or macOS MAMP


Windows MAMP


"; } else { echo "Using tidy

Using tidy

RJM Programming - March, 2022 - Thanks to https://www.php.net/manual/en/function.tidy-warning-count.php

" .tidy_error_count($tidy) . " errors

" . tidy_warning_count($tidy) . " warnings



"; } ?>