This is a simple script that can be executed to monitor a whole list of domains. The script tests for the presence of a character string on any specific page of your website. Run it at least every day.
The script requires a data file named domains.txt. That text file should contain one line per website page you want to monitor. Each line should have the url, the | character as a delimiter, then the search string. Example lines could be:
Code: Select all
tips-scripts.com|is a collection
otherdomain.com/directory/test.htm|content on that page
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Language" content="en-us" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Domain Verification</title>
<style type="text/css">
a { color: rgb(50,100,150); text-decoration: none; }
a:hover { color: rgb(150,100,50); }
</style>
</head>
<body>
<?php
$domainFile = "domains.txt";
$domainsArray = preg_replace("#\r\n?|\n#","",file($domainFile));
echo "<span style='font-weight: bold;'>Domain Validation</span><br />";
foreach ($domainsArray as $temp1Array) {
$temp2Array = explode("|",$temp1Array);
$url = $temp2Array[0];
$testString = $temp2Array[1];
$testFile = @file_get_contents("http://".$url);
if (strstr($testFile,$testString))
echo "<span style='color: green;'>? </span><a href='http://".$url."'>".$url."</a><br />";
else
echo "<span style='color: red;'>? </span><a href='http://".$url."'>".$url."</a><br />";
}
echo "Done.";
?>
</body>
</html>