Tara
Tara

Reputation: 610

How to close a php page in specific time?

I want to close a php page in 20 minutes after it was opened. Actual time is stored in mysql table.

It should display remaining time in page and the page should be closed after 0 of remaining time.

Upvotes: 0

Views: 191

Answers (1)

SeanCannon
SeanCannon

Reputation: 78006

PHP will send the headers out immediately. Just use JavaScript :

window.setTimeout(self.close, 1200000);

Upvotes: 2

Related Questions