PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Alex I.  >  PseudoGen  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Usage
Class: PseudoGen
Generate a pseudo random string
Author: By
Last change:
Date: 12 years ago
Size: 782 bytes


Class file image Download
 * This is an example of how to use the pseudogen class
 * @author Alex Iordache
 * @copyright 2009 Alex Iordache. Released under GPL terms
 * @version 1.0

$p = new pseudogen();

//use a set of 62 characters

//make it 6 letter long
$matrix = $p->generate_set(6);
"The MATRIX is:\r\n");

//setting the character set is only for demonstration. In most cases one will want to generate it once then
//save it directly into the class file

for (
$i = 0; $i < 100; $i++) {
$rnd = rand(100000, 999999);
$rnd . ' => ' . $p->encode( $rnd ) . "\r\n";

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