Keep alive page request, best practice

Hi all,
I need to make a page request every 7 minutes, one idea is an iframe and have its source do a meta refresh. The other idea is an infinite loop using sleep and file_get_contents.

Is there a better way to do this? Or which method would you use?

Thank you much
Cheers
Loren

what constitutes inactivity, is it keyboard/mouse inactivity or no new server requests?

Quick explanation, this is a wifi captive portal and it has an idle session timeout of ten minutes. gamers complain that they get bumped after ten minutes. I want the (I have a) popup script to keep the session alive. just wondering what is the best way to do this.

Thanks for the questions.

I goes by page load.

A google search for long polling might be helpful. I haven’t done this sort of thing myself.

Wiki entry - http://en.wikipedia.org/wiki/Push_technology

Do you wish for the whole page to be refreshed or just one area?

You can use Ajax to ping the server every 1 min and use a session variable to store the time of last request.

Then around 7 min mark or whatever, you can have a pop-up that notify the user.