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.

Hi
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.

thanks
Sep 9 '07 #1
6 4939
kovik
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?

Thanks
Sep 9 '07 #3
pbmods
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
Hi
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?
Thanks
Sep 14 '07 #5
ak1dnar
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.

PHP

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

15
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...
3
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...
2
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...
4
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...
4
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...
5
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...
0
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...
41
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...
0
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...
0
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,...
0
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...
0
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...
0
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
0
BarryA
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...
1
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...
0
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...
0
Oralloy
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,...
0
jinu1996
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.