0

I have some content (static html-files) on hosted Webspace with Apache, MySQL & PHP5.

I want to protect this content, so it can't be accessed (via htaccess maybe?). Then I want to create temporary URLs, which I can send to certain people. If they click on the link, they should see the protected content immediately, without password/key needed. The link should expire (after 30 days or something).

I need about 40 of theses URLs per year, so I'm looking for an easy way to create and manage these.

Should I use a common CMS like typo3 or wordpress with addons or something, or is this overkill?

Does anyone knows an easy & free software, which I could use on my webspace to create & manage these temporary access-links?

Any help is welcome! Thanks & Cheers, Holger

(Before anyone asks: the content isn't very private/confidential. So the risk, that a Link gets leaked and abused doesn't really bother me. It just shouldn't be visible for everyone...)

1 Answers1

0

There is probably a wordpress plugin that does this and you might want to look at that.

We've built this function into a few CMS apps. One approach was to have the admin tool and the public site share a secret. We then take the expiration date and encrypt it using the key. The front end decrypts using the shared secret and if it successfully decrypts and the date is acceptable it will render the page. The main advantage to this method is we didn't need to get into storing this information and it let people generate links with different shelf-lives for different audiences.

Another approach we've used with success is to generate a guid and an expiration date and stash that in a database. Then the public-facing preview link would just find things based on the guid and check the expiration date and render as appropriate. The advantage here is there is but one expiration date and moreover you can manually change that if need be. The former technique does not allow for updates without a new link.

Wyatt Barnett
  • 15,573
  • 3
  • 34
  • 53