I need to find a PHP based HTML (as in WC3-Like) Validator that can look for invalid HTML or XHTML. I've searched Google a little, but was curious if anyone has used one they particularly liked.
I have the HTML in a string:
$html = "<html><head>.....</body></html>";
And I would like to be able to test the page, and have it return the errors. (Not echo/print anything)
I've seen:
-http://www.bermi.org/xhtml_validator
-http://twineproject.sourceforge.net/doc/phphtml.html
The background for this is that I'd like to have a function/class that I run on every page, check if the file has been modified since the last access date (or something similar to that), and if it hasn't, run the validator so I am immediately notified of invalid HTML while coding.