PHP Classes

File: test.php

Recommend this page to a friend!
  Classes of Outdated profile   securepwd   test.php   Download  
File: test.php
Role: Example script
Content type: text/plain
Description: Example script
Class: securepwd
Checks wether a password is secure enough
Author: By
Last change:
Date: 20 years ago
Size: 898 bytes
 

Contents

Class file image Download
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
    <title>securepwd class test</title>
</head>

<body>

securepwd class test<br>
<br>

<form method=post action=test.php>
    User: <input type=text name=uid value="<? echo $GLOBALS["uid"]; ?>" size=30><br>
    Password: <input type=password name=pwd value="<? echo $GLOBALS["pwd"]; ?>" size=30><br>
    <input type=submit value="Check this password">
</form>

<?

   
if ($GLOBALS["pwd"] != "")
    {
        include
"securepwd.inc.php";

       
$securepwd = new securepwd (true, true, true, true, $GLOBALS["uid"], 5, "passwords.txt");

        if (
$securepwd->check ($GLOBALS["pwd"]))
        {
            echo
"This password is secure.";
        }
        else
        {
            echo
"This password is not secure:<br>";
            echo
$securepwd->geterror ();
        }

        echo
"<br>Report:<br>";

        echo
$securepwd->getreport ();

    }

?>

</body>
</html>