473,386 Members | 1,598 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Redirecting from a page after a certain amount of time has elapsed.

I am trying to write a PHP script such that the users are limited to a certain time to view the page.
And I would like to include a countdown timer as well in the page.
How can I do that?

I am using Apache and PHP5 with mysql in linux operating system.

Sep 9 '07 #1
6 4939
1,044 Expert 1GB
That sounds like a horrible idea. :P

Anyway, there's no way to really make that work because there are a million ways around it. You could limit them by session, but they can always start a new one. You can limit them with cookies, but they can always delete the cookie. You can limit them with JavaScript, but they can always press the back button.

Why would you want to do this?
Sep 9 '07 #2
Thanks for your response.

Actually, only logged in users are allowed to view the page. So maybe I can limit the time using "Sessions" as you said I could using sessions.

So, is there any hope?

Sep 9 '07 #3
5,821 Expert 4TB
Heya, shreedhan.

Are you looking to implement session timeout?

(once the above link expires, try running over to our Search page and look for 'session timeout' in the PHP forum)
Sep 9 '07 #4
I am trying to simulate an online test
And for that I need to redirect to results page after a certain limit of time
Is there anyway to do that?
Sep 14 '07 #5
1,584 Expert 1GB
How do you planing to redirect your web page to the result page. Is there any timer has setup with the application so far.
If you want to redirect the current page to another you can use headers.


Expand|Select|Wrap|Line Numbers
  1. header('Location: http://www.thescripts.com');
by adding this to your HTML head section, the current page will redirect after 5 secs to the specified location.
Expand|Select|Wrap|Line Numbers
  1. <meta http-equiv="refresh" content="5; url=result.php">
Sep 14 '07 #6
5,821 Expert 4TB
Merged duplicate threads.
Sep 14 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

by: kpp9c | last post by:
I am kind of in a bit of a jam (okay a big jam) and i was hoping that someone here could give me a quick hand. I had a few pages of time calculations to do. So, i just started in on them typing...
by: Chanchito | last post by:
hi there, I am seeking some guidance in regards to creating a query. I would like to be able to have the query display records that have had a certain amount of time pass since the time that is...
by: Paul L | last post by:
Hi, what's the correct way to redirect to a large binary file? I have a simple database that holds a list of names and URLs. The URLs are of large mp3s (around 80-100mb). I take the name as a...
by: Greg Smalter | last post by:
Redirecting from page to page within a web project is pretty easy. However, all Redirect methods take strings as arguments, as if you mistype the string, you don't find out until run time that you...
by: deepukutty | last post by:
HI all, I am using IE(Internet Explorer) as my default browser for asp.net application development. Today i faced a strange problem. When ever an exception occured in the page ....application...
by: DCC-700 | last post by:
I am using ASP.Net with VB on the 1.1 Framework running on Win XP Pro. I am trying to gauge the time it takes to sort a datagrid using different code sets. But when I am debugging the page there...
by: Dynamo | last post by:
Firstly, many thanks to those who replied to my dreaded what if question. As a result I have now been able to partially resolve my problem as follows: step 1 - User clicks on "buy me" button step...
by: amygdala | last post by:
Hello all, I have posted a similar question in comp.lang.php in the past, but haven't had any response to it then. I kinda swept the problem under the rug since then. But I would really like to...
by: Anup Daware | last post by:
Hi All, I am facing this very weird issue, for every server request my control is redirecting to the login page and again coming back to the actual page from where the request was initiated when I...
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.