Announcement

Collapse
No announcement yet.

how to log in by this?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to log in by this?

    somone gave me this an said it goes in global.php.Its a login from database i thik any help?

    Code:
     // Start initialisation 
    require_once('./includes/init.php'); 
    function authenticate() { 
        header("WWW-Authenticate: Basic realm=\"Your RiP Username & Password.\""); 
        header("HTTP/1.0 401 Unauthorized"); 
        echo "<html><head><META HTTP-EQUIV=\"Refresh\" CONTENT=\"0;URL=http://www.disney.com\"></head></html>"; 
        exit; 
    } 
    if (!isset($_SERVER['PHP_AUTH_USER'])) {  
        authenticate(); 
    } else {  
        if ($userauth=$DB_site->query_first("SELECT password,salt FROM user WHERE username='$_SERVER[PHP_AUTH_USER]'")) { 
            if (!(md5(md5($_SERVER['PHP_AUTH_PW']) . $userauth['salt']) == $userauth['password'])) {  
                authenticate(); 
            } 
        } else { 
            authenticate(); 
        } 
    }

  • #2
    Yep, that looks like login code. If you need help actually applying that code to a custom application, then I recommend you post on www.vbulletin.org.

    Comment


    • #3
      Originally posted by Jake Bunce
      Yep, that looks like login code. If you need help actually applying that code to a custom application, then I recommend you post on www.vbulletin.org.
      It was supposedly found here he said on the main vB site.I searched for hours here and at vB.org. I just need to add to the global php file.

      thanks jake.I will see if anyone has an answer at vB.org

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...
      X