473,513 Members | 2,492 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

52 New Member
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 4943
kovik
1,044 Recognized Expert Top Contributor
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
shreedhan
52 New Member
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 Recognized Expert Expert
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
shreedhan
52 New Member
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 Recognized Expert Top Contributor
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 Recognized Expert Expert
Merged duplicate threads.
Sep 14 '07 #7

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

Similar topics

15
2001
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
1802
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
1260
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
1483
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
2174
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
2071
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
1206
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
3184
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
1150
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
7260
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7161
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
7384
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,...
1
7101
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7525
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5089
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4746
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3234
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1596
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.