Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.