downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Funcții Crack> <Constante predefinite
[edit] Last updated: Fri, 25 May 2012

view this page in

Exemple

This example shows how to open a CrackLib dictionary, test a given password, retrieve any diagnostic messages, and close the dictionary.

Example #1 CrackLib example

<?php
// Open CrackLib Dictionary
$dictionary crack_opendict('/usr/local/lib/pw_dict')
     or die(
'Unable to open CrackLib dictionary');

// Perform password check
$check crack_check($dictionary'gx9A2s0x');

// Retrieve messages
$diag crack_getlastmessage();
echo 
$diag// 'strong password'

// Close dictionary
crack_closedict($dictionary);
?>

Notă:

If crack_check() returns TRUE, crack_getlastmessage() will return 'strong password'.



add a note add a note User Contributed Notes Exemple
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites