Results 1 to 4 of 4

Thread: How can i password protect my website

  1. #1
    Join Date
    Jul 2009
    Posts
    56

    How can i password protect my website

    Thank you very much for replying my previous question and now i am here with one more. I am sorry if this query exists, but i wanted to keep only the users i want on my page. For that i need to protect my website with a password. I really don't know how to do that. Could you guys please make me know how can i password protect my website ?

  2. #2
    Join Date
    Apr 2008
    Posts
    2,005

    Re: How can i password protect my website

    Thats true that you need to make your websites password protected keep only the users you want on your page or you may have some parts of your web site may be private. You may do this in two ways, that are,, Using Server based password protection or by scripting. Follow this:-

    If you want to do this by Server based than the requirement is that your host supports it.E-mail your web host and ask them what they recommend. Many web hosts are run by experienced webmasters and will be more than willing to help. They will also know details about your hosting setup.Your Hosting provider will provide control through a control panel where you can configure the protected directories and username/passwords.

    Look into using server side tools, like .htaccess and .htpasswd files, php pages, or perl scripts.For a more complex membership type system, were the visitor can create and edit his own username and password, you need a fully fledged membership site system. These are normally written in php, perl or asp and usually require database (MYSQL, SQL or access) support.

    Never trust anything that is supposed to password protect a page that runs on the client side, as these are the easiest to bypass, and usually only restrict users from viewing the secure page by not giving them a link straight to it. You should ensure that your host supports the necessary components before you purchase a membership system.

  3. #3
    Join Date
    Feb 2008
    Posts
    1,852

    Re: How can i password protect my website

    You can also protect your website with a password using Script. The javascript displays a form to enter the Username and Password. If either is wrong, it will display and alert screen like ‘Wrong Username’ or ‘Wrong Password’. Script will present user with password entry form, and will not let visitor see your private content without providing a password.To do so , use this script:-

    <SCRIPT>
    function passWord() {
    var testV = 1;
    var pass1 = prompt('Please Enter Your Password',' ');
    while (testV < 3) {
    if (!pass1)
    history.go(-1);
    if (pass1.toLowerCase() == "letmein") {
    alert('You Got it Right!');
    window.open('protectpage.html');
    break;
    }
    testV+=1;
    var pass1 =
    prompt('Access Denied - Password Incorrect, Please Try Again.','Password');
    }
    if (pass1.toLowerCase()!="password" & testV ==3)
    history.go(-1);
    return " ";
    }
    </SCRIPT>
    <CENTER>
    <FORM>
    <input type="button" value="Enter Protected Area" onClick="passWord()">
    </FORM>
    </CENTER>

  4. #4
    Join Date
    May 2008
    Posts
    2,012

    Re: How can i password protect my website

    The scripts can be very simple with the username and password embedded in the page but only viewable in source mode to more complex ones where the password/username is encrypted and hence more secure.

    <script language="javascript">
    <!--// function pasuser(form) { if (form.id.value=="secretname") { if (form.pass.value=="secretpassword") { location="http://quickonlinetips.com/" } else { alert("Wrong Password") } } else { alert("Wrong Username") } } //-->
    </script>
    <form name="login">
    Username: < input name="id" size="6" type="text">Password: < input name="pass" size="6" type="password">< input value="Login" onclick="pasuser(this.form)" type="button">
    </form>

Similar Threads

  1. Protect game by password
    By FRITZ31 in forum Video Games
    Replies: 5
    Last Post: 31-12-2009, 01:29 AM
  2. How to protect password?
    By Otilio in forum Windows Software
    Replies: 3
    Last Post: 21-11-2009, 05:12 PM
  3. Protect files from download from website
    By Quattro in forum Software Development
    Replies: 3
    Last Post: 06-11-2009, 10:41 AM
  4. How to Password protect your Computer
    By DwinHell in forum Windows Software
    Replies: 3
    Last Post: 07-08-2009, 01:07 PM
  5. Javascript password to protect website
    By vishodhan in forum Software Development
    Replies: 2
    Last Post: 03-03-2009, 03:26 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,001,034.37598 seconds with 17 queries