<?php
// Code by KaosKaizer of DragonPrime.NET
// This script is to create passwords randomly. Use it with your custom registration script.
function zedpass($strlen=7,$nums=false,$caps=true){
if ($strlen < 7) $strlen = 7; // set the default as the lowest accepted length
if ($strlen > 75) $strlen = 75; // do not allow the length to exceed 75
$low = "abcdefghijklmnopqrstuvwxyz";
$cap = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
$num = "0123456789";
$fin = $low;
if ($caps === true) $fin .= $cap;
if ($nums === true) $fin .= $num;
$password = "";
for ($i=0; $i < $strlen; $i++){
$password .= $fin[rand(0,strlen($fin))];
}
return $password;
}
?>