hi im making a site and i want to make a page to be only accesable after 3.15pm. if there cant be a way dont matter.
i use dreamweaver cs4
my file client is filezilla
hi im making a site and i want to make a page to be only accesable after 3.15pm. if there cant be a way dont matter.
i use dreamweaver cs4
my file client is filezilla
You also need to consider when the page becomes inaccessible again. It's always after 3:15pm yesterday!
Using PHP:
Code:if(intval(date('H')) >= 15 && intval(date('H')) < 24 || (intval(date('H')) > 15 || intval(date('i')) >= 15)) { // if the time is greater than 4pm or at least 15 minutes past the hour // after 3:15 page } else { // another page }
gjr.gr - coming soon: secrets of OCD coding from a self taught tinkerer
Another thing to consider is when 15:15 actually is. It is that time for you/the time the server happens to be on, or is it specifically after 15:15 for each visitor to your site?
If anyone can see it, my post was meant for anyone who reads it. Don't take it personally or think I'm being condescending... :nuts:
another way you can do it is this way
granted, I am not sure how well that will work or even if it will work.Code:if(strtotime('now') >= strtotime('3:15 pm')){ }else{ echo 'I am sorry, you are not allowed to view this page.'; }
I would love to change the world, but they won't give me the source code
Not at all, for several reasons...
the best route to go down would be
Simply put, that checks if the current server hour is after 15 (3pm), or if it is 15 AND the minutes have reached 15.PHP Code:<?php
$page1 = 'pages/after315.html';
$page2 = 'pages/before315.html';
if ((date('G') > 15) || ((date('G') == 15) && (date('i') >= 15)))
require_once($page1);
else
require_once($page2);
?>
After that it will use the require() function to load a different page. Should it be the right time, it will load one page, else it will load a different one. Those pages were defined in variables are the start.
This will use the server time. Every day, page 2 will load from midnight until 15:15, which will then show page1 until midnight :D
Last edited by Scoochi2; 07-15-2009 at 04:11 AM.
If anyone can see it, my post was meant for anyone who reads it. Don't take it personally or think I'm being condescending... :nuts:
thank u scoochi2 for your help. and also im trying to install mybb forum but im stuck.
heres what ive done.
1. downloaded th Upload file and uploaded them to my site
2. using filezilla chmodded the files
3. made a database called db and name came out as duffryc_db
whitch i will use in step 5
4.started installation
5. cant get passed step four after i type in all the details and click next it says error i typed in sumfin wrong.
I would love to change the world, but they won't give me the source code
Do you have trouble reaching your site?
Check here first: News and Announcements
Don't forget that x10hosting has an irc server as well. Come and join the fun
server: irc.x10hosting.com, main channel: #x10hosting
There's a lot helpful users there if need help building your site