Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
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

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.htmlGood luck,
-SN

: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

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

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?

This is how it works:
First, we'll assume that your website is at:
http://www.geocities.com/simone1) 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.

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

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.

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

![]() |
![]() |
![]() |

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