tags:

views:

37

answers:

3

I want to redirect users from a certain page after 10 minutes, and as I redirect them I want to do some stuff with some php code. Is this possible without using sessions? What if the user clicks the 'stop' button on his/her browser?

Thanks!

A: 

Make a javascript/refresh redirect, then on the page they are redirectede to call your PHP?

Its not possible for you to know if the user hit stop, or simply went away to surf on another page.

Cederstrom
+2  A: 

Use a "meta" redirect if you ALWAYS need to redirect users away from your page

<meta http-equiv="refresh" content="600;url=otherpage.php">

naivists
A: 

If you want to redirect the user if he stays too long in a page you will have to use javascript.

Create a timer and when the timer ends it redirects the user using

window.location.href = 'www.bla.com'

You can also use cookies in javascript.

AntonioCS