• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

prevent access to webpage by date and time

Community Beginner ,
Mar 14, 2021 Mar 14, 2021

Copy link to clipboard

Copied

Is it possible to prevent someone from viewing the contents of the webpage (partial or full) until a certain date and time? For example, if i have a webpage with a link, but only want that link on the webpage to be viewed at a certain start date and time, is this possible?

 

Thank you!

Views

115

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 15, 2021 Mar 15, 2021

Copy link to clipboard

Copied

Don't publish the page until that certain date and time.

Wappler, the only real Dreamweaver alternative.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 15, 2021 Mar 15, 2021

Copy link to clipboard

Copied

LATEST

If you're on Linux hosting, schedule a Cron Job to run a script at a given date and time (server's time).

https://linuxize.com/post/scheduling-cron-jobs-with-crontab/

 

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 15, 2021 Mar 15, 2021

Copy link to clipboard

Copied

does the code scare you, or can you write a few lines... this link should help you... in fact the HTML content will only be visible according to date ranges

https://stackoverflow.com/questions/4319135/jquery-or-javascript-that-display-content-based-on-the-d...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 15, 2021 Mar 15, 2021

Copy link to clipboard

Copied

Do you know any php?

 

You could do something like below, hard code the date at which point onwards you want the link to appear:

 

<?php
$date = date("Y-m-d");
if($date >= "2021-03-15") { ?>
<a href="showInfo.php?showInfo="true">Link</a>
<?php } ?>

 

 

 

On the showInfo.php page which the link is set to go to check to see if the 'showInfo' url parameter is set:

 

<?php if(isset($_GET['showInfo'])) { ?>
<h1>Welcome</h1>
<?php } else { ?>
<h1>No Access</h1>
<?php } ?>

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines