|
| |
|
|
womble
Posts: 5513 Joined: 3/14/2005 From: Living on the edge Status: offline
|
Password protect a web page - 2/2/2007 16:25:23
Anyone who runs a forum knows just how irritating those damned spammers peddling their pharmaceutical goods and such like, and worse, can be. I seem to spend half my life clearing up after them. I'd looked at various options for trying to stop them, but the simplest I've found so far is this one - all it needs is one line of PHP added to the very top of the page you want protecting, and no-one can get to it without the password. I've applied it to my registration page - the password's available on the forum, so real human type people can find it, but not the bots (although I suppose you could use a simple question like on Mike Cherim's spam-proof form as well). I tarted the password form page up a bit to add in the site's logo and a bit more of an explanation as to why the system had been introduced, but probably for most purposes you can use it as it is. http://www.zubrag.com/scripts/password-protect.php It's only been installed on this particular forum for about five hours now (but yay! no more spammers today! ), but we've used something similar on another forum I co-admin, and it cut our spammer problem down from 100+ per week to virtually zero overnight. It can be used on any web page you want to protect, and you don't have to know PHP to use it. Uploading the file to your site and then opening the script page in your browser gives you the exact text you need to use for the 'include' line, for example, www.mydomain.com/password_protect.php. From the results of that page you simply paste that include into the very top of the page you want protecting, and once you've set the users (if you want to have different user accounts) and passwords in the script itself (you just open the script up in a text editor and edit as instructed in the script, and you're set - ideal if you want to protect certain pages but don't need an admin panel and bells and whistles.
_____________________________
~~ "A cruel god ain't no god at all" ~~
|
|
|
|
treetopsranch
Posts: 1007 From: Cottage Grove, OR, USA Status: offline
|
RE: Password protect a web page - 2/2/2007 23:37:56
Not really sure you can use that script if you use FrontPage Extensions. I think it alters the .htaccess file. I noticed that a question was asked if it worked with Frontpage in their forum but I could not see any answer there. Can someone here test it for us FP extension users?
_____________________________
Don from TreeTops Ranch, Oregon "I've got a taste for quality and luxury"
|
|
|
|
Kitka
Posts: 2514 Joined: 1/31/2002 From: Australia Status: offline
|
RE: Password protect a web page - 2/6/2007 19:00:52
quote:
Note: That one's pages MUST use the .php extension for this to work. Not quite true. You can simply add a handler to your .htaccess file so it will work with .htm and .html files as well. AddHandler application/x-httpd-php .htm .html
_____________________________
Kitka **It is impossible to make anything foolproof because fools are so ingenious.**
|
|
|
|
Thomas Brunt
Posts: 6109 Joined: 6/6/1998 From: St. Matthews SC USA Status: offline
|
RE: Password protect a web page - 2/7/2007 8:46:06
Here's a bit of code you can put into your .htaccess file that will allow php code to work on .htm pages. AddType application/x-httpd-php .htm AddType application/x-httpd-php .html t
_____________________________
Expression Web Help Frontpage Help Dreamweaver Help
|
|
|
|
treetopsranch
Posts: 1007 From: Cottage Grove, OR, USA Status: offline
|
RE: Password protect a web page - 2/7/2007 14:42:38
Still waiting for someone to test that script on a FrontPage Extension enabled web site.
_____________________________
Don from TreeTops Ranch, Oregon "I've got a taste for quality and luxury"
|
|
|
|
wisnuclear
Posts: 87 From: toledo oh toledo, ohio Status: offline
|
RE: Password protect a web page - 2/9/2007 10:57:07
Has anyone tried to protect a folder and it's contents?
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|