File: ppRandPass.example.php

Recommend this page to a friend!
  Classes of Chris Jeffries  >  PHP Generate Memorable Password  >  ppRandPass.example.php  >  Download  
File: ppRandPass.example.php
Role: Example script
Content type: text/plain
Description: ppRandPass example
Class: PHP Generate Memorable Password
Generate random passwords from words of a RSS feed
Author: By
Last change:
Date: 3 years ago
Size: 919 bytes


Class file image Download
<title>ppRandPass example</title>
<h1>ppRandPass example</h1>
include ('ppRandPass.class.php');
$oPass = new ppRandPass();
$oPass->url = '';
//The url of a constantly changing RSS feed
//The remaining properties need not be set if you are happy with the defaults
$oPass->minlength = 4; //Only words of 4 letters or more chosed (default is 5)
$oPass->maxlength = 6; //Only words of 6 letters or less chosen (defualt is 8)
$oPass->numwords = 3; //Three words randomly picked from list (default is 2)
$oPass->discard_front = 2; //The first two words retrieved will not be used (default is 0)
$oPass->discard_back = 3; //The last three words retrieved will not be used (default is 0)

echo "Randomly generated password:<b> {$oPass->password} </b>";

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