January 3, 2009
20 Random Alphanumeric Passwords
The passwords:
No record is made of these passwords.
Deprecated: Implicit conversion from float 627150.0000000001 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43
Deprecated: Implicit conversion from float 627420.0000000001 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43
Deprecated: Implicit conversion from float 627560.0000000001 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43
Deprecated: Implicit conversion from float 627840.0000000001 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43
Deprecated: Implicit conversion from float 627980.0000000001 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43
Deprecated: Implicit conversion from float 628269.9999999999 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43
URPVkWukwhwq6YrTMPdW
Deprecated: Implicit conversion from float 628819.9999999999 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43
Deprecated: Implicit conversion from float 629360.0000000001 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43
DsVGsNcPh4HnA46CYbWa C23UvkcLV9NEcLkx4tME 7dbbaz3gLR3TJhLKhezA tCxU6h6DpFncoBW2DCLq F49LXu3qWpWQmChJTXAm wHjuYy6kvhGxDTF7srNr BSXo9rQhUzPTf6FK7PKa WEDhsFtUnhEfqRmkTknS 9sQpSpfgu4EU4S7W84K9 c6AnCPCAPVfcDEwpM6Pv FEVJXW9rBLatFu2YmedN EaLXkhZUVS6Bebud3Low EVyeRPVSFo6h2SoBA3Ry mMzRbaPwpuFQRoPvXGAn PY4BXPWgc47RghKN3yeA Bg8vHhzPBscDRrRvjYwy hfQTcFY6pKaKwodfmxeA
Deprecated: Implicit conversion from float 653090.0000000001 to int loses precision in /usr/home/crawberts/public_html/lab.artlung.com/web/password-maker/PasswordGenerator.php on line 43
USRa7RAWbvwmtCfLyD3Y UGjRANZKZtXnNykZW8WE
The code for the class
<?php
/**
* Class PasswordGenerator
*
* @category PHP
* @package Classes
* @author Joe Crawford <joe@artlung.com>
* @license GPL 2.0+ - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* @version Release: 1.0
* @link https://artlung.com/
* @since 2024-12-03
*/
class PasswordGenerator
{
public static $letters = "2346789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghjkmnopqrstuvwxyz";
public static $length = "20";
public $letters_array;
/**
* PasswordGenerator constructor.
*/
function __construct()
{
$this->letters_array = array();
for ($a = 0; $a < strlen(self::$letters); $a++) {
$this->letters_array[] = self::$letters[$a];
}
}
/**
* Make password
*
* @return string
*/
function make(): string
{
$password = '';
for ($i = 0; $i < self::$length; $i++) {
srand((float)microtime() * 10000000);
$password .= $this->letters_array[array_rand($this->letters_array)];
}
return $password;
}
/**
* Print one password
*
* @return void
*/
function printOne()
{
print $this->make();
}
/**
* Print many passwords
*
* @param $num
*
* @return void
*/
function printMany($num)
{
for ($i = 0; $i < $num; $i++) {
$this->printOne();
print "\n";
}
}
}
How to invoke the class
$PG = new PasswordGenerator(); $PG->printMany(20);