|
|
|
| Web Hosting |
![]() ![]() |
Password Protect Your Page, Its a very simple script, do not use it for any thing serious! |
Apr 9 2006, 04:09 AM
Post
#1
|
|
|
Advanced Member Group: Banned Posts: 149 Joined: 2-December 05 From: Bangalore, India. Member No.: 9,923 |
Guys, if you like it you can use it, but one thing I would like to tell is that its not entierly safe to use such a thing, it depends on your content that you are trying to protect from usual visitors, beginners this is for you. The best part is that you do not need any kind of scripts installed on your server, it is in JavaScript which is embeded in to your HTML page. Just change the username from "asta" to your choice and password from "host" to your preference.
Here is the code... CODE <script language="javascript"> <!--// /*This Script allows people to enter by using a form that asks for a UserID and Password*/ function pasuser(form) { if (form.id.value=="asta") { if (form.pass.value=="host") { location="page2.html" } else { alert("Invalid Password") } } else { alert("Invalid UserID") } } //--> </script> <center> <table bgcolor="white" cellpadding="12" border="1"> <tr><td colspan="2"><center><h1><i><b>Login Area</b></i></h1></center></td></tr> <tr><td><h1><i><b>UserID:</b></i></h1></td><td><form name="login"><input name="id" type="text"></td></tr> <tr><td><h1><i><b>Password:</b></i></h1></td><td><input name="pass" type="password"></td></tr> <tr><td><center><input type="button" value="Login" onClick="pasuser(this.form)"></center></td><td><center><br><input type="Reset"></form></td></tr></table></center> Your username and password can be viewed from the source code of your page, just to make it more secure, encrypt. And now, if you are thinking "How am I going to encrypt a page?", visit this page (http://www.cyberiapc.com/aascripter/samples/Security/sub9.htm), over here you just have to paste your java script code and it will encrypt it for you. On this page you can even give it an encrypted code and it will decrypt it for you (bring it back to its original state). Thus the above script must not be used for anything serious. If you plan to go and hide something more serious try, Bravenet.com service which is much, much secure, its just like loging into your email ID (yahoo or hotmail). |
|
|
|
Apr 9 2006, 04:50 AM
Post
#2
|
|
|
the Q Group: [HOSTED] Posts: 1,205 Joined: 13-July 05 From: Lithuania, Vilnius Member No.: 7,059 myCENTs:49.62 |
I don't really see any point of using a javascript password protect
|
|
|
|
Apr 9 2006, 08:53 AM
Post
#3
|
|
|
Advanced Member Group: Banned Posts: 149 Joined: 2-December 05 From: Bangalore, India. Member No.: 9,923 |
QUOTE(Quatrux @ Apr 9 2006, 05:50 AM) [snapback]74955[/snapback] I don't really see any point of using a javascript password protect The point is that now-a-days free hosts don't give all kinds of scripting capabilities, I know that AstaHost give unlike others. I already told you that using the encryption method will be better, because it makes it difficult, and one more thing I mentioned was that, it should not be used for anything serious. You could use it to protect some page in your hooby site or something like that, not anything tooooooo private or serious. |
|
|
|
![]() ![]() |
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
Similar Topics
| Topic Title | Replies | Topic Starter | Views | Last Action | |||
|---|---|---|---|---|---|---|---|
![]() |
13 | Feelay | 1,151 | 19th December 2008 - 03:43 AM Last post by: laniczech |
|||
![]() |
4 | www.jbi.in | 364 | 12th December 2008 - 02:03 AM Last post by: quack |
|||
![]() |
5 | derouge | 1,536 | 30th November 2008 - 07:16 AM Last post by: iG-Rev.Keith Ratliff |
|||
![]() |
6 | Jimmy89 | 1,304 | 26th November 2008 - 11:03 PM Last post by: magiccode9 |
|||
![]() |
9 | FirefoxRocks | 1,290 | 17th November 2008 - 07:25 AM Last post by: Atomic0 |
|||
![]() |
0 | khalilov | 151 | 9th November 2008 - 11:10 AM Last post by: khalilov |
|||
![]() |
16 | Beefdip | 1,793 | 1st November 2008 - 04:25 AM Last post by: Guest |
|||
![]() |
14 | Feelay | 1,078 | 28th September 2008 - 10:05 PM Last post by: sozo33 |
|||
![]() |
1 | soleimanian | 1,592 | 18th September 2008 - 01:35 PM Last post by: FirefoxRocks |
|||
![]() |
3 | FirefoxRocks | 328 | 12th September 2008 - 02:07 AM Last post by: xboxrulz |
|||
![]() |
20 | soleimanian | 4,088 | 27th August 2008 - 08:10 AM Last post by: Atomic0 |
|||
![]() |
5 | Mitch666Holland | 426 | 26th August 2008 - 10:28 AM Last post by: yordan |
|||
![]() |
7 | joe.k | 2,478 | 19th August 2008 - 11:53 AM Last post by: Guest |
|||
![]() |
5 | evought | 1,971 | 12th August 2008 - 06:58 AM Last post by: Guest |
|||
![]() |
22 | essential_clix | 3,528 | 7th August 2008 - 09:27 PM Last post by: Guest |
|||
|
Lo-Fi Version | Time is now: 7th January 2009 - 07:44 PM |
© 2009 AstaHost: Free Web Hosting & Technical Discussion, Free Web Hosting. a member of xisto.
Powered by Invision Board. Skin: IPB Forum Skins
Expand / Collapse Navigation



Apr 9 2006, 04:09 AM





