La parte encerrada entre comentarios corresponde a esa verificación:
Código PHP:
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<script>
function _(id){return document.getElementById(id);}
onload=function(){
/*------------*/
window.o={}
o.m=document.body.innerHTML;
setInterval(
function(){
if(o.m!=document.body.innerHTML){
o.m=document.body.innerHTML;
alert('hubo un cambio');
}
},1000);
/*------------*/
var aj=(XMLHttpRequest)?new XMLHttpRequest():new ActiveXObject('Microsoft.XMLHTTP');
aj.onreadystatechange=function(){
if(this.readyState==4){
_('pp').innerHTML=this.responseText;
}
}
aj.open('get','algo.txt',true);
aj.send(null);
}
</script>
</head>
<body>
<div id="pp"></div>
</body>
</html>