<?php
include "pass.class.php"; //Include File
echo "<pre>"; //Nice Formatting
$pass = new PassGen; // Initiate the object
$pass->Type = 'letter'; // Set the type of generator ( letter or word )
// Array of words [WORD Type Only]
$pass->Words = array('these','words','will','part','that','used','number','length');
$pass->Ucase = true; // Use Upper Case Letters? [LETTER Type Only]
$pass->Lcase = true; // Use Lower Case Letters? [LETTER Type Only]
$pass->Nums = true; // Use Numbers? [LETTER Type Only]
$pass->Other = "!@#$%*"; // Other Characters Can be Used? leave blank for none [LETTER Type Only]
$pass->Len = 10; // Lenght Of Generated String [LETTER] >OR< Number of words chosen [WORD]
$pass->ForceLen = true; // Should we trim the string after generation to the specified lenght? [WORD Type Only]
//Print the first password
echo $pass->Generate(); echo "<br>";
// CHANGE TO WORd TYPE
$pass->Type = 'word';
echo $pass->Generate(); echo "<br>";
// DISABLE FORCE LENGTH
$pass->ForceLen = false;
echo $pass->Generate(); echo "<br>";
?>
|