<?php
/*
Ce fichier est sous licence GPL V2 ou V3.
Je vous demanderai toutefois de bien vouloir me faire parvenir (par mail ou par
un autre moyen à votre convenance) les modifications que vous êtes suceptibles
d'y ajouter, ainsi que leurs justification.

--------------------------------------------------------------------------------------

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 or 3 of the License.

Thanks to send me any change you can wrote to this project and their reasons.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
?>
      <form action="./Verifier-force-mot-de-passe.html" method="post">
        <div>
      <input type="password" name="passwd" /><br />
          <input type="submit" value="verifier" />
        </div>
      </form>
<?php
if (isset($_POST['passwd']))
{
  
$passwd=$_POST['passwd'];
  
  
$nbchar=strlen($passwd)-1;
  
$force=$nbchar*((intval(abs($nbchar/5)))+1);
  
  if (
ereg ("[0-9]"$passwd)) $force*=2;
  if (
ereg ("[a-z]"$passwd)) $force*=3;
  if (
ereg ("[A-Z]"$passwd)) $force*=3;
  if (
ereg ("[^0-9a-zA-Z]"$passwd)) $force*=5;
  echo 
"      La force de votre mot de passe est de : $force<br />\n";
}
?>