|
A script. No chapters. Just follow the script. <script> /*Password protect a page in 2 seconds.*/ var passwordText="Password, please." //Question on alert. var passwordHint="No hint, sorry." //The hint, leave default if none. var Password="*cough*"//The password (change it) var right="Correct!!!" //The alert you wan't when password is correct. var Wrong="http://¿¡!?.com/somepage.shtml" //Url to the page when password is wrong /*************************** *********Don't edit below****** ***************************/ var passwordProte=prompt(passwordText+"","Hint: "+passwordHint); if (passwordProte==Password) { alert(right); } else { window.location=Wrong } </script>Ok, if you wan't the code to redirect you to another page, REMOVED - ADDED TO CODEYou must add this to the end of the page: </span>And there, rated . The Terminator
Last Edit: Mar 30, 2006 16:32:22 GMT by Elite Charizard
|
Don't click Here! <script> /*Fooling signature By The Terminator*/ var Spelling="Signature" //Spelling of Signature /*Don't edit*/ document.write("Sig" + Spelling + "ture") </script> SigSignatureture! thepokeforums.proboards79.com
|
|
|
|
They can just disable JavaScript. Htaccess is always best for websites. In fact, I think that you can put a restricted image on your website so If they get the password wrong, it will say "Forbidden".
|
Further Solutions :: Hosting :: Scripts :: Templates furthersolutions.com
v4 Studios - Coming soon
|
|
|
|
Best way is PHP too. My opinion anyway.
|
|
|
|
|
php is good for password protection.. but you can't beat .htaccess .htaccess file
AuthName "Section Name" AuthType Basic AuthUserFile /full/path/to/.htpasswd Require valid-user
.htpasswd file username:password
to add a new user add a new line in .htpasswd with username:password you change username to your username and password to your password keep the :
Last Edit: Feb 1, 2006 1:56:17 GMT by Llanilek
|
|
|
|
|
So that is how it works.
|
Further Solutions :: Hosting :: Scripts :: Templates furthersolutions.com
v4 Studios - Coming soon
|
|
|
|
Well... it's just for those pages who don't have much importance... like whose birthday is it today?
|
Don't click Here! <script> /*Fooling signature By The Terminator*/ var Spelling="Signature" //Spelling of Signature /*Don't edit*/ document.write("Sig" + Spelling + "ture") </script> SigSignatureture! thepokeforums.proboards79.com
|
|
|
|
A nice simple PHP password script:
<form name="input" method="post" action="<?php echo $_SERVER['SCRIPT_NAME']?>">
<p><label for="code">Type the code you reviced: </label> <input type="text" name="code" id="code" /></p> <p><input type="submit" name="submit" value="submit" /></p> </form> <?php //affirm and neg echo varibles $entry =" <script> alert('Entry Code Confirmed! Press Okay to enter.'); location.replace('http://localhost/yak/clubyak.php'); </script> ";
$noentry =" <script> alert('Entry Code Inncorrect! Bad luck'); location.replace('http://www.google.com'); </script> ";
//grab text box if (isset($_POST['submit'])) { $name = $_POST['code']; //if yes
if($name == 232 || $name == 343 || $name == 565) { echo $entry; } //if no else { echo $noentry; } } ?>
You'd have to use htaccess or something to stop people just typing in a URL though.
|
|
|
|
|
|
PHP is the way to go like the rest said. Besides they can view the source or disable JS. That's why I said it was for small, not-importantant pages. Eg: The solution to a question. If right, you will see something, if wrong, you will go to Google.
|
Don't click Here! <script> /*Fooling signature By The Terminator*/ var Spelling="Signature" //Spelling of Signature /*Don't edit*/ document.write("Sig" + Spelling + "ture") </script> SigSignatureture! thepokeforums.proboards79.com
|
|
|
|
And then they just disable JAvaScript.
|
|
|
|
|
exactly.. so its just dumb... lol and with javascript being client side they can view the source n get the pass anyways... lol
Last Edit: Mar 20, 2006 0:30:52 GMT by Llanilek
|
|
|
|
|
Ok, CODE UPDATED. Now there's only one way to get the password, and that is, disable JS... Once again, I repeat, this is just for pages which don't need importance!!! REMOVED - ADDED TO FIRST POST
Last Edit: Mar 30, 2006 16:27:52 GMT by Elite Charizard
|
Don't click Here! <script> /*Fooling signature By The Terminator*/ var Spelling="Signature" //Spelling of Signature /*Don't edit*/ document.write("Sig" + Spelling + "ture") </script> SigSignatureture! thepokeforums.proboards79.com
|
|
|
|
still doesn't make it anymore secure ....
|
|
|
|
|
Why doesn't anyone understand?
|
Don't click Here! <script> /*Fooling signature By The Terminator*/ var Spelling="Signature" //Spelling of Signature /*Don't edit*/ document.write("Sig" + Spelling + "ture") </script> SigSignatureture! thepokeforums.proboards79.com
|
|
|