rendered paste body---------------index.php---------------<? session_start(); if (!isset($_SESSION['hila'])) { $hila = 1; $_SESSION['hila'] = $hila; } else { $hila = 0; } echo $hila;?><html> <head> <title>test</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script type="text/javascript"> window.onunload = function() { var x = new Image; x.src = "xpic.php"; } </script> </head> <body> </body></html>--------------xpic.php--------------<?php unset($_SESSION[hila]); unset($hila); ?>