I have a script that I want to limit the amount of time a visitor can stay on it.
Say 2 hours.
After that, the visitor will be forced to leave by sending a new header, meta refresh, or whatever. I'll figure out that later.
My problem is how do I get the script to countdown.
Say the user visits at 8:00am. the user can only stay 'till 10:00am.
I know php is a bad way of doing this, but I would like to use javascript/php.
javascript will do a live countdown. When time is up, the next time the visitor clicks on a link or refreshes the page, the script will send the user elsewere.
How can I get javascript and php to work together, assigning variables, etc..
Please help me out with the coding. If you have other ideas, that would be great too!
I tried using cookies, but I send out header information before I call my cookies and I can't send header information before. I dont' feel like re-writing my code either.