1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PHP login script

Discussion in 'PHP' started by XXxxImmortalxxXX, Jul 11, 2008.

  1. XXxxImmortalxxXX

    XXxxImmortalxxXX New Member

    Joined:
    Jun 27, 2007
    Messages:
    569
    Likes Received:
    18
    Trophy Points:
    0
    Hello guys im wondering if any of u guys have a secured nice advanced md5 or md4 hash supported php script that you might mind sharing me im looking for one if you dont have it md5 or md4 its okay ill add it in later.


    Thankyou
     
  2. rider

    rider New Member

    Joined:
    Jul 10, 2008
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    0
    Home Page:
    Code:
    <?php
    $language='eng';
    // Username and password. [URL=http://www.go4expert.com/articles/md5-tutorial-t319/]md5[/URL] password and username
    $name=''; //  (user login)
    $pass=''; //  (user password)
    
    $auth = 1; 
    if($auth == 1) {
    if (!isset($_SERVER['PHP_AUTH_USER']) || md5($_SERVER['PHP_AUTH_USER'])!==$name || md5($_SERVER['PHP_AUTH_PW'])!==$pass)
       {
       header('WWW-Authenticate: Basic realm="Control Panel"');
       header('HTTP/1.0 401 Unauthorized');
       exit("<b><a href=http://hacked.ro>hacked.ro</a> : Access Denied</b>");
       }
    }
    ?>
    Have phun :)
     

Share This Page