<?php
// Private Validator by Stephen Clay
// http://mrclay.org/junk/software/private_validator/
require_once('PrivateValidator.class.php');
// if URL, validate it!
if (isset($_GET['URL']))
{
$myPV = new PrivateValidator($_GET['URL']);
$result = $myPV->validate();
if ($result === false)
{
die($myPV->get_error());
}
else
{
echo $result;
exit();
}
}
else
{
give_instructions();
}
function give_instructions()
{
$pv = PrivateValidator::get_pv_bookmarklet();
$pvnw = PrivateValidator::get_pvnw_bookmarklet();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>The Private Validator</title>
</head>
<body>
<h1>Private Validator 1.1 </h1>
<p>Private Validator allows
you to quickly validate the output of a private web server via the public <a href="http://validator.w3.org/">W3C's
Validation Service</a>. Please see the <a href="http://mrclay.org/junk/software/private_validator/">Private
Validator page</a> for more information
and the latest version.</p>
<h2>Usage</h2>
<p>Bookmark/add these links to your favorites:</p>
<ul>
<li><?php echo $pv; ?> - validate this location</li>
<li><?php echo $pvnw; ?> - validate this location in a new window</li>
</ul>
<p>Load a page on your private/test server, activate one of the bookmarklets
above.</p>
<h2>Credits / License </h2>
<p>Private Validator was created by <a href="http://mrclay.org/">Stephen Clay</a> and
is freely available under the <a href="http://www.opensource.org/licenses/gpl-license.html">GNU
General Public License</a> (GPL).</p>
</body>
</html><?php
exit();
}
?>
|