A simple, secure password-protected file area

A secure area on a website is a great way to deliver content to clients. You don’t have to send attachments around, and you can watch the logs to see when the files were accessed.

Recently, I worked on a site that required a password-protected media area. They didn’t want HTTP Authentication (which you have to admit is clunky) so I reworked the client area script that runs on my consulting site. It’s not rocket science, but there are a few tricky bits so I thought I’d share it and maybe save you some time.

Before releasing it, I asked for some advice on distributing PHP applications on Stack Overflow. I incorporated most of the suggestions, so I hope you’ll find the install painless. You’ll need PHP. This was tested on Linux and OS X, but I don’t see why it wouldn’t work on Windows.

Download securearea-1.0.tar.gz

Installation

1. Download and untar: securearea-1.0.tar.gz

2. open SecureAreaConfig.php.sample and edit it for your setup

3. save as: SecureAreaConfig.php

Now, you can copy these files to your webserver and access the file: client.php

You’ll see a some vanilla HTML which you can easily customize to match your site.

Once you have SecureArea working, you should move the “secure” directory to somewhere outside your webserver root, so that the files can only be accessed through the SecureArea script.

Download securearea-1.0.tar.gz

Demo: Try out SecureArea

Send feedback to the SecureArea comment box

Related posts

  • No Related Posts

You can leave a response, or trackback from your own site.

Leave a Reply