« PhpList Mailing List script | Main | Supreme Court rejects hearing 'Kemosabe' appeal »
April 27, 2005
One page prtoected or Multiple...
I get asked a lot of times on how to protect pages and directories. This morning I found a couple of tutorials that will show you how to do it. There are lots of different methods, and websites hosted on servers that offer Cpanel have access to a tool to do this.
The first one I'd like to share with you is how to protect a single page.
This would be handy if you have offered your subscribers a download, but don't want to allow access to the general public. In this case, you would send out the user name and password in your newsletter or in the email they receive when they subscribe.
You can see the quick tutorial and download the code.
The second one is slightly more involved. This tutorial show you how to use Php sessions to protect a group of pages. The author says:
This tutorial will show you one of the ways to protect areas of your web site using the PHP sessions. You only have to write the login script that changes the status of the user to authenticated based on a username and password provided through the form and add a small piece of code to all of your pages you want to be protected.Usage : Session support in PHP consists of a way to preserve certain data across subsequent accesses. This enables you to build more customized applications and increase the appeal of your web site.
This would be good if you had more then one page to protect. Still, probably not quite as secure as using .htaccess and .htpasswd but handy none-the-less.
You can read the tutorial here.
Posted by Steve MacLellan at April 27, 2005 08:25 AM
Trackback Pings
TrackBack URL for this entry:
http://www.homebusiness-websites.com/mt/mt-tb.cgi/181
Comments
Post a comment
Thanks for signing in, . Now you can comment. (sign out)
(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)