Usa AJAX:
Codice PHP:
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Documento PHP</title>
<script type="text/javascript">
function reqListener () {
document.getElementById("contenitore").innerHTML = this.responseText;
setTimeout(updateReq, 10000);
}
function reqError (oErr) {
confirm("Non è stato possibile inoltrare la richiesta. Si desidera riprovare?") && updateReq();
}
function updateReq () {
var oReq = new XMLHttpRequest();
oReq.onload = reqListener;
oReq.onerror = reqError;
oReq.open("get", "[color=red]includimi.php[/color]", true);
oReq.send();
}
onload = function () {
setTimeout(updateReq, 10000);
};
</script>
</head>
<body>
<div id="contenitore"><?php include "includimi.php"; ?></div>
</body>
</html>