Computing.Net > Forums > Web Development > Securing a Web Page with a password

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Securing a Web Page with a password

Reply to Message Icon

Name: simonecassia
Date: November 5, 2004 at 10:12:29 Pacific
OS: win98 se
CPU/Ram: 2 g
Comment:

My boyfriend is reading my blog, and I don't really want him to. It's a Geocities page without .HTacess, so how could I make a password in html or java on certain pages so that he cannot read them?
Thanks in advance



Sponsored Link
Ads by Google

Response Number 1
Name: SN
Date: November 5, 2004 at 10:45:42 Pacific
Reply:

Put this in the head of your HTML:

If (Identity.User.IsInRole('Boyfriend'))
{
    Security.Access.Deny();
}
else
{
    Security.Access.Grant();
}

Of course, with most boyfriends, this code will not be compatible with their operating systems, so they'll likely start frequenting other, less restrictive sites.

A slightly more cross-boyfriend compatible version would be:
If (Blog.isOffensiveTo('Boyfriend') {
    Blog.sendTo('Girlfriends&Exes');
    Blog.delete();
}

Seriously though, if you're boyfriend is even slightly computer literate, there is no way to stop him from seeing the page. Your best bet is to either avoid saying bad things about your boyfriend in your blog, find a boyfriend who doesn't have any flaws to write in a blog about, or follow cerj's suggestion in this post:
http://www.computing.net/programming/wwwboard/forum/7199.html

Good luck,
-SN


0

Response Number 2
Name: Laler
Date: November 5, 2004 at 13:02:20 Pacific
Reply:

:D

in case you got confused:

you can't safely password protect a geocites page... all browser has option to disable javascript, and almost all of them can `view the source` of the file... so to create a good password, you need a `server-side` scripting which isn't available in geocities... you can do some confusing javascript scheme to set up the password but still, if you don't do it server-side, he can always get the password...

there're a lot of packages like a few dollar per year which will allow you to do some server side scripting...


^o^
are you in Asia? do you watch Animax Asia? Please Vote


0

Response Number 3
Name: Laler
Date: November 5, 2004 at 13:21:08 Pacific
Reply:

after looking at cerj's suggestion, I agree it's a quite good method... if someone give me a page protected with that method then I'll go confused 0_0

^o^
are you in Asia? do you watch Animax Asia? Please Vote


0

Response Number 4
Name: simonecassia
Date: November 5, 2004 at 16:44:58 Pacific
Reply:

I didn't understand how it works. How can the code identify who is my bf or me? Excuse if it's a fool question, but i'm a newbie yet.
And as I can see, it doesn't ask for a password, so is it really secure?


0

Response Number 5
Name: Don Arnett
Date: November 5, 2004 at 18:58:05 Pacific
Reply:

This is how it works:

First, we'll assume that your website is at:
http://www.geocities.com/simone

1) The person types in a password into an INPUT field on one of your pages. Let's say that the password is "mybfstinks".

2) Using javascript, you collect that INPUT field value and create a URL from it. Something like http://www.geocities.com/simone/mybfstinks.html

3) Using javascript, jump to that new URL. I don't remember how you do this. I think that you set window.location and then call submit() or something like that.

If the specified webpage exists, they'll go to it. If it doesn't exist, then they'll get a 404 error.

So basically, you create a webpage that uses the 'password' as part of the filename. THen when someone enters a password, you generate a URL and jump to it. If they enter the correct password, they'll find the page, if the enter the wrong password, they'll get a 404 error.


0

Related Posts

See More



Response Number 6
Name: Laler
Date: November 9, 2004 at 14:19:39 Pacific
Reply:

anyone knows how to "find the password" on cerj's javascript suggestion? :D not by bruteforcing or somekind... is there a way to browse the folder? can search engine bots find a file which has no link pointing to it anywhere?

^o^
are you in Asia? do you watch Animax Asia? Please Vote


0

Response Number 7
Name: Don Arnett
Date: November 10, 2004 at 18:54:03 Pacific
Reply:

I believe that most webservers have directory listings turned off. If that's the case, I doubt that there is a way other than just guessing.


0

Response Number 8
Name: Laler
Date: November 19, 2004 at 02:44:52 Pacific
Reply:

back to the 1st question :D

in freewebs.com 's site builder there's an option to password protect certain pages...


^o^
are you in Asia? do you watch Animax Asia? Please Vote


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: Securing a Web Page with a password

Starting Web page www.computing.net/answers/webdevel/starting-web-page/118.html

Cant publish page with FrontPage www.computing.net/answers/webdevel/cant-publish-page-with-frontpage/136.html

how to zoom web page w/ mouse over www.computing.net/answers/webdevel/how-to-zoom-web-page-w-mouse-over/1895.html