homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / WebmasterWorld / New To Web Development
Forum Library, Charter, Moderators: brotherhood of lan & mack

New To Web Development Forum

Allow Page at a specific time interval daily
Please Help

 7:57 pm on Aug 3, 2009 (gmt 0)

Hi, I am still learning my first steps in web development, and here is what I need.
I need a web page to be only available at a specific time interval daily, for example starting from 10.00 am to 10.15.
If the visitor tried to access this page at any other time a message appear to him to inform him that this is not the allowed time for this action or he could be directed to another page.
I need this function to be secure as much as possible, but again I am a beginner so if this security will need some complicated scripting or advanced server features or languages, then a less secure option can be accepted.

Thanks in advance for everyone who will try to help.



 8:07 pm on Aug 3, 2009 (gmt 0)

I don't have an answer for you, but is that the server time or the user time. Are all your users in the same time zone?

Welcome to WebmasterWorld


 8:17 pm on Aug 3, 2009 (gmt 0)

Thanks for your fast response,
It can be either the Sever time or User time, this doesn't cause a problem for me, All users are in the same time zone "GMT+2.00"


 9:08 pm on Aug 3, 2009 (gmt 0)

Again I have not tried this, but searching on (.htaccess time) there are some simple time redirects that you can use.


 9:51 pm on Aug 3, 2009 (gmt 0)

I have been searching and wasn't able to reach anything regarding .htaccess, but through my search I found this link, I think this explains what I need, but I am looking for some free script.


 10:27 pm on Aug 3, 2009 (gmt 0)

Try this [unixcities.com] I searched on .htaccess time


 6:40 am on Aug 4, 2009 (gmt 0)

You can use PHP if you want to. Create your page with the .php extension, then add a time check.

$start = '10:00';
$stop = '10:15';

if (date('h:i')>=$start && date('h:i')<=$stop) {
// You can`t view this page..
} else {
// Ok, add relevant code here..



 8:51 am on Aug 4, 2009 (gmt 0)

If you are using server time take account not only of the server's time zone but also, if it is in a different country, when daylight saving starts and ends.

All users are in the same time zone

That assumes that their PCs are running with the correct date/time.

Global Options:
 top home search open messages active posts  

Home / Forums Index / WebmasterWorld / New To Web Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved