<?php
//
// test.wwwcheckup.php
//
// This is a document to demonstrate possible usages for the
// class.wwwcheckup.php class.
//
// Andrew Collington, 2002
// http://www.amnuts.com/ - andy@amnuts.com
//
include "class.wwwcheckup.php";
$cu = new WebsiteCheckup("user","pass","websites","test");
if (isset($add))
{
echo "Adding http://www.amnuts.com/ - ", ($cu->AddWebsite("http://www.amnuts.com/")?"succesful":"failed"), "<br>\n";
echo "Adding http://amnuts.talker.com/ - ", ($cu->AddWebsite("http://amnuts.talker.com/")?"succesful":"failed"), "<br>\n";
echo "Adding http://amnuts.talker.com/cgi-bin/AMboard/UltraBoard.pl - ", ($cu->AddWebsite("http://amnuts.talker.com/cgi-bin/AMboard/UltraBoard.pl")?"succesful":"failed"), "<br>\n";
echo "Adding http://phpclasses.upperdesign.com/ - ", ($cu->AddWebsite("http://phpclasses.upperdesign.com/")?"succesful":"failed"), "<br>\n";
echo "Adding http://bbe.amnuts.com/ - ", ($cu->AddWebsite("http://bbe.amnuts.com/")?"succesful":"failed"), "<br>\n";
}
if (isset($checkup))
{
$cu->SetAutoUpdate(1);
$cu->DisplayUpdates();
echo "<br><br>\n\n";
}
if (isset($list))
{
$cu->DisplayAll();
echo "<br><br>\n\n";
}
if (isset($noupdate))
{
$cu->SetAutoUpdate(0);
$cu->DisplayUpdates();
echo "<br><br>\n\n";
}
echo "<hr noshade>\n";
echo "<p><a href=\"$PHP_SELF?add=1\">Add some demo sites</a></p>\n";
echo "<p><a href=\"$PHP_SELF?list=1\">List all websites (no updating)</a></p>\n";
echo "<p><a href=\"$PHP_SELF?checkup=1\">Check for updates (and make changes in database)</a></p>\n";
echo "<p><a href=\"$PHP_SELF?noupdate=1\">Check for changes (and make no changes in database)</a></p>\n";
?>
|