Rate this script:  I Love it  /   I Hate it

Simple w3c Validator


Code


<?php
function w3Valid($url) {
        require("Snoopy.class.php");
        $snoopy = new Snoopy;

        $snoopy->fetchtext("http://validator.w3.org/check?uri=" . $url . "&output=soap12");
        $validator_output = $snoopy->results;

        if(preg_match("/false/", $validator_output)) {
                return false;
        } else {
                return true;
        }
}

?>
 

 

 
Simple w3c Validator scripts | Simple w3c Validator snippet | Simple w3c Validator example | Simple w3c Validator tutorial | Simple w3c Validator code