14218Password Protectionhttp://www.sbrady.com/hotsource/javascript/passw.htmlFire up Notepad and copy the below code. Save the code as "password.txt". When you upload it to your server make sure to change the filename to "password.js".
If you can not change the file name when uploading, you must use a hex editor to save the file as 'password.js'. Click here to go to a site where you can download a hex editor.JavaScript > Scripts and Programs > User AuthenticationOct 12, 2006
Fire up Notepad and copy the below code. Save the code as "password.txt". When you upload it to your server make sure to change the filename to "password.js".
If you can not change the file name when uploading, you must use a hex editor to save the file as 'password.js'. Click here to go to a site where you can download a hex editor.
The program dynamically encrypts the password (using several advanced JavaScript techniques) when storing it, so simply viewing the source will not reveal it (Most password protectors don't encrypt the password. Gatekeeper does not use a password).
Unlike Gate Keeper, the program does NOT simply take the surfer to the file he/she enters as the password. Instead, it navigates to a page only if the surfer correctly enters the password. Invalid passwords will result in an "invalid password" alert.
The program is similar to Gatekeeper, however, in that the file you are protecting must be renamed to match the password you have chosen for it.
Note: This program dynamically encrypts the password specified, so each time you use the program, the resulting output will be different, even for the same password. An added cushion of security!
There has been one bug report so far, affecting some versions of Internet Explorer. It exists in the 'password generator' script, rather than in the main password script, so it will not affect any visitors to your pages, regardless which browser they choose to use. If you find that you can not generate the new URLs, you may have to use Netscape to get around this problem for the time being. It is not a fault in the script, but in the way IE does not support JavaScript correctly. Nonetheless, a bug fix is in the works, so keep an eye out for the new version
We at WLScripting.com have created many php tutorials for you to follow so you can enhance your website. If you have any questions please post a comment for that tutorial.
Use this script to block certain IPs from your webpage, by redirecting them to another site. Note that your web server must have SSI enabled (most Linux servers do), with the page using the correct extension (ie: .shtml) in order for this script to work. Furthermore, since this script relies on JavaScript to block the user (by redirecting the person to another site), if he/she disables JavaScript in the browser, the script will become futile.
Joining mailing list will entitle you
to receive occasional emails informing you of news and
updates to the site and any special offers that may be
of interest to you.