Jump to content

Close browser window, or redirect at specific time


davelr45

Recommended Posts

I need to "remove" users from a web page at a specific time without the user making an action.

I was thinking something with session_destroy and meta refresh but it has to happen at 11am

the users are logged in to the page with a session.....any ideas? Thanks.

 

More specific: I need them to be removed without any action, this is a single page with a video feed

they are essentially "sitting" on this one page watching a video. The problem we are running into

is that users are keeping that page open beyond the time that is allocated to their specific video, and tying

up bandwidth for other viewers.

Thorpe is right, you need to use JS. But how will you know how long to wait before redirecting/closing the window? It will depend on the clients connection speed, buffering rates, etc... I really don't know how you will do this without kicking a user off before they have finished watching the movie...

 

You need to figure something else out, maybe like keeping a bandwidth counter in a session variable and using PHP filesize()... I dunno.

This is kinda what I was thinking but I wanted to know if anyone had done it before.

live video 1 goes from 9am to 10:55 am (these users must not be watching video after 11am)

live video 2 goes from 11am to 12.55pm

 

$currtime = current time()...

$time_log_off = 11:00am...

$diff = $currtime - $time_log_off...

 

echo "<meta http-equiv=\"refresh\" content= \"$diff\;url=video_over.htm">";

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.