Jump to content

Show website at a specific date and time...


indiodoido

Recommended Posts

hi...

 

I've created a new site, and its going to be online in September.

Until then, i would like to have online a simple countdown that will display the time left until that day, and when we reach that date the new web page would appear automatically.

 

Can anyone help me?

Link to comment
https://forums.phpfreaks.com/topic/66907-show-website-at-a-specific-date-and-time/
Share on other sites

it is not safe to have the website accessible before it goes public anyway, it doesn't matter that there will be no link to the other pages they can still be found by luck or patience. Just have the site off the server or protect it using .htaccess (if on Apache) and if you want the site to go public automatically just add a cron job and run a script that will do it...

 

And the count down must be made with JavaScript or any form of client side scripting...

 

Kathas

Perhaps write a simple script to include at the top of the pages.

 

e.g

$openat = mktime(1,0,0,9,1,2007); // 1 AM, September 1st, 2007 read more at php.net/mktime
$javascript = "<br>
<script type=\"text/javascript\">
//put some code here for javascript countdown.
</script>
";
if(time()<$openat){
die("The website will open on: " . date("M d Y",$openat) . $javascript);
}

Well actually if he/she has access to the php.ini file or even setting a htaccess php_flag.

 

All they would have to do is make a file I described then simply edit the value of auto_append_file to the file handling the auto-opening.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.