<?phpif(isset($_GET['moisrex'])){
header('Content-Type: text/html; charset=utf-8');
$opts = array(
'http'=>array(
'method'=>"GET",
'header'=>"Accept-language: en\r\n"
)
);
$context = stream_context_create($opts);
echo file_get_contents('http://www.parsdata.com/free-domain/Default.aspx?ajax=1&sys=data&out=FDAjax&cul=fa-IR',false,$context);
}
?>
<script>
var code=null;
function loadXMLDoc(){
var http=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject('Microsoft.XMLHTTP');
http.onreadystatechange=function(){
if(http.readyState==4 && http.status==200){
if(code!=null && code!=http.responseText){
alert('آپدیت شده ...');
}
code=http.responseText;
}
};
http.open('GET','?moisrex',true);
http.send();
}
setInterval(loadXMLDoc,3000);
</script>