NELLA FINESTRA CHE RICHIAMA LO SCRIPT

function quando_si_chiude(){
document.location='script.php';
}

----------------------------

IN FONDO AL FILE PHP

echo "
<script>
document.location='file_dove_devo_andare.html'
</script>
";

-----------------------------

e' un po' rozzo ?