user188962
user188962

Reputation:

timeout in php, is there any other way than using sessions?

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!

Upvotes: 0

Views: 118

Answers (3)

AntonioCS
AntonioCS

Reputation: 8496

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.

Upvotes: 0

naivists
naivists

Reputation: 33511

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

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

Upvotes: 2

Cederstrom
Cederstrom

Reputation: 58

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.

Upvotes: 0

Related Questions