I would like to detect when the page closes and after 10 seconds, use php to call a url. Since php is server side, I imagine that unlike JS, it will call the url regardless of whether the page is active or not.
URL to call: http://postback.com/?id=xx