first

test bogus'; if (isset($_GET['yourhtml'])) { $incv="tidy_parse_string"; $htmlin=str_replace('+',' ',urldecode($_GET['yourhtml'])); if (strpos(strtolower($htmlin), 'appendChild($docx->importNode($e, true)); $dfx=$docx->saveHTML(); if ($ioff == -2 && strpos(strtolower($dfx), 'importNode($n->cloneNode(true),true); $d->appendChild($b); $h = $d->saveHTML(); // remove outter tags if (!$outer) { $h = substr($h,strpos($h,'>')+1,-(strlen($n->nodeName)+4)); } else { if ($ioff == -2 && strpos(strtolower($h), 'loadHTML($htmlin); //foreach ($doc->childNodes as $itemcn) { //if ($rest == "") { $rest = " +++ "; } //$rest.=' ' . str_replace('>','>',str_replace('<','<',nodeContent($itemcn, false))); //} foreach ($doc->getElementsByTagName("*") as $item) { $elecnt++; if ($rest == "") { $rest = " ... "; } //$rest.='
' . str_replace('>','>',str_replace('<','<',outerHTML($item))); $rest.='
' . str_replace('>','>',str_replace('<','<',nodeContent($item, true))); } $twc='Number of elements detected is ' . ($ioff + $elecnt) . $rest; } //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

" . $tec . "

" . $twc . "

Mac OS X or macOS MAMP


Windows MAMP


PHP DomDocument


"; } else if (!$isthere) { echo "Using tidy

Using tidy

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

" . $tec . "

" . $twc . "



"; } else { echo "Using tidy

Using tidy

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

" . $twc . "

" . $twc . "



"; } ?>