|
womble -> 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! [sm=boogie.gif]), 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.
|
|
|
|