PHP runs on the server. PHP streams out the HTML necessary for the browser to render a page, then the connection between the server and the browser terminates. So as far as PHP could know, the browser is only "online" for the few seconds it takes for the browser to accept the HTML to render the page.
There may be a client-side scripting method in JavaScript or VBScript that can be invoked when the browser is shut down. You would have to ask there.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.