Gracias por la respuesta, lo he solucionado de la siguiente manera con Ajax, solo pongo el codigo de frame.php lo demás es igual
Código PHP:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Documento sin título</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
var http = crearAjax();
function crearAjax()
{
var xmlhttp=false;
try
{
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
catch (E)
{
xmlhttp = false;
}
}
if (!xmlhttp && typeof XMLHttpRequest!='undefined')
{
xmlhttp = new XMLHttpRequest();
}
return xmlhttp;
}
window.onbeforeunload = function(){
guardar_info();
}
function guardar_info(){
http.open("GET", "destroyclose.php", true);
http.onreadystatechange=function()
{
if (http.readyState == 1){
alert("Cerrando Sesion");
}
if (http.readyState == 4){
results = http.responseText;
alert("Listo");
}
}
http.send(null);
}
</script>
</head>
<body>
</body>
</html>
Espero les sirva a quienes buscan algo similar