View Full Version : Password Proctecting....
DawgieDog
12-23-2002, 04:23 PM
Anyone out there has a script/code(whatever) that protects a page with a password and username?
beetle
12-23-2002, 04:26 PM
Protect in what way? A user and pass are always safe UNTIL the information is sent across to the server, and that is outside of javascript's realm of control.
So, what are you trying to do exactly?
DawgieDog
12-23-2002, 04:36 PM
I'm making a site for a clan in a game I play and I decided I wanted to make the clan a page so here I am making the site and we want to add a "only members area" where let's say for example we'll have cheats, tips and stuff just for members. So what I want is a password protecting thing so only the members that know the username and password will be able to get in. Nothing big you know.
ez4me2c3d
12-23-2002, 04:57 PM
your better off doing it in PHP. that way you can store your password and username list right on the page but no one will ever see it.
Skyzyx
12-24-2002, 03:10 AM
If it's a clan page, you may have to tell everyone to use IE to view it, then encode your JavaScript (JSE) with Microsoft's Script Encoder, found at:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/seconscriptencoderoverview.asp
I don't know (but I don't think) it works with Gecko, so you might want to write a password script, and then encode your script so no one can read it...
That may be an option...
Skyzyx
12-24-2002, 03:15 AM
Also, I haven't actually used this, but it's supposed to be good. Check it out:
http://www.codingforums.com/showthread.php?s=&threadid=10114
DawgieDog
12-24-2002, 04:06 AM
Originally posted by ez4me2c3d
your better off doing it in PHP. that way you can store your password and username list right on the page but no one will ever see it.
PHP, eh? I suck at that, hehe :o.
chrismiceli
12-24-2002, 04:24 AM
there is a simple js way that is completly unsecure, but will detur the average user, put the pass in a js file, then prompt to confirm it.
//js file
password = "hee";
//html file
<script type="text/javascript" src="jsfile.js">
</script>
<script type="text/javascript">
funtion lo() {
test = prompt("Enter the password", "Here");
if (test == password) {
parent.location.href = "wherever.html"
}
else {
parent.location.href = "google.com";
}
}
</script>
<body onLoad="lo()">
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.