[php]
< ?php
$site = "http://www.sitetocheck.com"; // Site to check
$hash = md5(file_get_contents($site));
if ($hash == file_get_contents("checkhash.txt") )
{
echo "same hash\n";
}
else
{
file_put_contents("checkhash.txt",$hash);
mail("[email protected]", "Sitechange", "Sitechange: ".$site , "From: Sitetest <[email protected]>");
}
// 2012 by hoohead
?>
#!/bin/bash
url=""
while [ 1 ]; do
curl -s "$url" > tmp2
if ! diff tmp1 tmp2>/dev/null; then
echo "@name Deine Seite hat sich veraendert. ${url}" | ttytter -script;
cat tmp2 > tmp1
fi
sleep 3600
done;</pre>
<pre>[/php]