On Thu, June 22, 2006 4:16 am, weetat wrote: > Can we detected if user have clicked the "X" button in browser or > close browser ? > I have tested in my php program ,when i click "X" in IE6 , the > execution did not stop , it still running . > Any ways to stop the program execution when user click the "X" > button > or close browser ? There is no RELIABLE way to do that. An javascript thingie for "onStop" if it exists might help. PHP's ignore_user_abort being on/off can sometimes pass back their "stop" action, or not... I suspect that the return value from feof('php://stdout') *MIGHT* maybe change to FALSE when Apache recognizes that the browser is "gone"... But 100% reliable way probably does not exist, afaik. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php