previousIntroduction (Previous) (Next) Services_Weathernext

View this page in Last updated: Sun, 18 Oct 2009
English | Brazilian Portuguese | Chinese | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

Examples

Examples – Using Services_W3C_HTMLValidator

Getting results from the HTML Validator

The following examples demonstrate how to get validation results from an instance of the W3C HTML Validator.

Validate by URI

This is a simple example which shows how to validate a URI and return whether the page is valid or not.

<?php
require_once 'Services/W3C/HTMLValidator.php';

$v = new Services_W3C_HTMLValidator();
$u 'http://www.unl.edu/';
$r $v->validate($u);

if (
$r->isValid()) {
    echo 
$u.' is valid!';
} else {
    echo 
$u.' is NOT valid!';
}
?>
previousIntroduction (Previous) (Next) Services_Weathernext

Download Documentation Last updated: Sun, 18 Oct 2009
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.