Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Yudha Setiawan  >  Simple Password Generator  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example usage
Class: Simple Password Generator
Generate password text with random characters
Author: By
Last change: Just Update
Date: 2013-07-16 12:06
Size: 1,020 bytes
 

Contents

Class file image Download
<?php 
require_once "password.class.php";


echo 
"Default setting : " $passGen->generate() . "<br>";

$passGen->configure(array(
            
"uppercase" => true,
            
"special" => true,
        ));
echo 
"Just uppercase and special characters : " $passGen->generate() . "<br>";

$passGen->configure(array(
            
"uppercase" => true,
        ));
echo 
"Just uppercase : " $passGen->generate() . "<br>";

$passGen->configure(array(
            
"lowercase" => true,
        ));
echo 
"Just lowercase : " $passGen->generate() . "<br>";

$passGen->configure(array(
            
"number" => true,
        ));
echo 
"Just number : " $passGen->generate() . "<br>";

$passGen->configure(array(
            
"special" => true,
        ));
echo 
"Just special characters : " $passGen->generate() . "<br>";

$passGen->configure(array(
            
"extra" => true,
        ));
echo 
"Just extra characters : " $passGen->generate() . "<br>";

$passGen->flush();
$passGen->configure(array(), 10);
echo 
"Length 10 characters with the lastest setting : " $passGen->generate();