Automatically Close PHP Web Page after 4 Hrs

264
August 26, 2017, at 02:27 AM

In my website, I have to show Videos everyday. I want to close the Video Playing Webpage after my customers may login and watched the video for 4 hours timeout period.

I don't wish to make any change in the video player code but I want to redirect or Close the entire PHP Page after reaching 4 hours.

Answer 1

Add this in the page

header("refresh:14400;url=another_page.php");

Change the page name accordingly

Answer 2

Why not with javascript?
You can try:

<script type="text/javascript">setTimeout("window.close();", 14 400 000 );</script>

Those 14 400 000 are 4 hours converted to miliseconds.
Hope it helps.

Rent Charter Buses Company
READ ALSO
How to find Max value from set of rows and insert a row (increment value by one)

How to find Max value from set of rows and insert a row (increment value by one)

I have a two columns of data: Course_Num and RecordNum

228
how can i connect my c++ program with mysql

how can i connect my c++ program with mysql

I am building a program to generate summary of placement scenario in a particular collegeI am taking input from input console in C++

296
Is it possible to use the agate module in Python to save databases to MySQL?

Is it possible to use the agate module in Python to save databases to MySQL?

I was looking for a better way to try to read files and use them to create tables for MySQL, and I stumbled across agate, so I'm trying to see if it will work for my purposes

341
Setting defined variables (icons) from a database

Setting defined variables (icons) from a database

I user icons in a variety of dynamic ways and store them a database

248