navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

Password protect a web page

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Community >> OutFront Discoveries >> Password protect a web page
Page: [1]
 
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"


(in reply to womble)
womble

 

Posts: 5513
Joined: 3/14/2005
From: Living on the edge
Status: offline

 
RE: Password protect a web page - 2/3/2007 12:45:04   
AFAIK it doesn't alter the .htcaccess file - at least it's not mentioned in the script at all - if a cookie's not been set it brings up the include file with the form asking for the username and/or password, then if that matches what's in the settings in the script, redirects to the page you're protecting.

Eeep! That link's now opening some strange Russian language site that appears to be for hosting/co-location or something - most odd. Maybe they forgot to pay their hosting bill? :)It definitely wasn't doing that yesterday! If anyone's interested in the script though, drop me a PM and I'll email it.


_____________________________

~~ "A cruel god ain't no god at all" ~~
:)

(in reply to treetopsranch)
jaybee

 

Posts: 14145
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: Password protect a web page - 2/3/2007 13:01:33   
It says they've run out of bandwidth and it's all your fault. :)

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to womble)
womble

 

Posts: 5513
Joined: 3/14/2005
From: Living on the edge
Status: offline

 
RE: Password protect a web page - 2/3/2007 13:18:41   
:)

_____________________________

~~ "A cruel god ain't no god at all" ~~
:)

(in reply to jaybee)
tinaalice

 

Posts: 97
From: Stockport, Cheshire. UK
Status: offline

 
RE: Password protect a web page - 2/6/2007 11:30:48   
It's working now ..

Note: That one's pages MUST use the .php extension for this to work.

So ideal for php forums, blogs and that sort of thing. No doubt there is something similar for ASP.

Tina

_____________________________

Expression Web Help
Expression Web Blog/link]
[link=http://tech.groups.yahoo.com/group/any-expression/]Any Expression Tips Ezine

FrontPage Help - FrontPage Tutorials
FrontPage Addins, FrontPage Addon Ezine
FrontPage Ezine, Free FrontPage EBook

(in reply to womble)
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.**


(in reply to tinaalice)
tinaalice

 

Posts: 97
From: Stockport, Cheshire. UK
Status: offline

 
RE: Password protect a web page - 2/6/2007 19:28:54   
I was going off what it said:) I know nothing about php.. perhaps someone should give them that info?

This is neat ... my control panel for pw is clunky and I usually end up spending twice a long figuring out how I did it last (the help file is nothing like the panel)... I need one to show a test web too so it happens.. kewl.

Tina

_____________________________

Expression Web Help
Expression Web Blog/link]
[link=http://tech.groups.yahoo.com/group/any-expression/]Any Expression Tips Ezine

FrontPage Help - FrontPage Tutorials
FrontPage Addins, FrontPage Addon Ezine
FrontPage Ezine, Free FrontPage EBook

(in reply to Kitka)
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


(in reply to tinaalice)
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"


(in reply to Thomas Brunt)
womble

 

Posts: 5513
Joined: 3/14/2005
From: Living on the edge
Status: offline

 
RE: Password protect a web page - 2/7/2007 15:50:57   
A while since I've used FP, but AFAIK, as long as you don't FTP, I wouldn't think it would affect the FPSEs.

_____________________________

~~ "A cruel god ain't no god at all" ~~
:)

(in reply to treetopsranch)
Kitka

 

Posts: 2514
Joined: 1/31/2002
From: Australia
Status: offline

 
RE: Password protect a web page - 2/7/2007 16:58:00   
quote:

ORIGINAL: Thomas Brunt

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


That is almost exactly what I said above - but my code is more compact :) :)

_____________________________

Kitka
**It is impossible to make anything foolproof because fools are so ingenious.**


(in reply to Thomas Brunt)
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?

(in reply to Kitka)
Kitka

 

Posts: 2514
Joined: 1/31/2002
From: Australia
Status: offline

 
RE: Password protect a web page - 2/9/2007 14:39:07   
This tool should help you with that:

http://tools.dynamicdrive.com/password/

Or, if you want to use the FrontPage method, see this tutorial:

http://www.outfront.net/tutorials_02/fp_techniques/frontpage-subwebs.htm

There is a good step by step guide with screen shots here:

http://www.verio.com/support/documents/view_article.cfm?doc_id=3715

_____________________________

Kitka
**It is impossible to make anything foolproof because fools are so ingenious.**


(in reply to wisnuclear)
Page:   [1]

All Forums >> Community >> OutFront Discoveries >> Password protect a web page
Page: [1]
Jump to: 1





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