I hate giving this answer as I'm almost always proven wrong.... but no, not really.
You can do all sorts of tricks with javascript to query the server in the background every so many seconds and find out if you should display the warning.... but there's no way for the server to just alert a client like that with HTTP and PHP.
You can start writing fancier applications which just use the browser as a GUI interface, but communicate with different protocols which will accomplish what you want however.