File: example.php

Recommend this page to a friend!
  Classes of amani  >  PHP Password Generate  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example of password generate class usage
Class: PHP Password Generate
Generate random password text of given length
Author: By
Last change:
Date: 6 years ago
Size: 827 bytes


Class file image Download
 * <name>Generate powerfull password class</name>
 * <author>Akbar Amani </author>
 * <email> </email>
<span>get password through ajax</span>
<a href="ajax.html"><b>Ajax Mode<b/></a>
<br />
<br />
<br />

// New the class to make Object
$PassGen = new PassGenerate();

// Set character set what we want create password from them
$AllChar = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^*()_';

// Set our new password length

// Get our new generated password with $AllChar variable, notice if $AllChar be equal null, The class use default character set
$NewPass = $PassGen->GetPass($AllChar);

// echo our password
echo 'your password is: <pre>'.$NewPass.'</pre>';

For more information send a message to info at phpclasses dot org.