Hi visitors here i will explain how we can create random password using simple php script.
function Random_Password($length) {
srand(date("s"));
$possible_charactors = "abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ";
$string = "";
while(strlen($string)< $length) {
$string .= substr($possible_charactors, rand()%(strlen($possible_charactors)),1);
}
return($string);
}
echo Random_Password(8);
makes a password on 8 chars
examples:
include(“genpassword.function”)
Another example a good Pronounceable Password Generator can be done like this
function genpassword($length){
srand((double)microtime()*1000000);
$vowels = array("a", "e", "i", "o", "u");
$cons = array("b", "c", "d", "g", "h", "j", "k", "l", "m", "n", "p", "r", "s", "t", "u", "v", "w", "tr",
"cr", "br", "fr", "th", "dr", "ch", "ph", "wr", "st", "sp", "sw", "pr", "sl", "cl");
$num_vowels = count($vowels);
$num_cons = count($cons);
for($i = 0; $i < $length; $i++){
$password .= $cons[rand(0, $num_cons - 1)] . $vowels[rand(0, $num_vowels - 1)];
}
return substr($password, 0, $length);
}
echo genpassword(10);
makes a password on 10 chars
Incoming search terms:
- php genPassword (7)
- how to create random password in php (6)
- zend random password (6)
- How to create passwords in php (5)
- how to create ul li using menu (4)
- php script for generate random password (2)
- how to create the random questions using php? (2)
- random password zend (2)
- charkeycode javascript tutorial (2)
- createrandome passwords using php (2)
- To create random password in PHP (1)
- php shuffle function custom array microtime (1)
- php script that generate passwords automaticall (1)
- php script random password (1)
- php script for random string online (1)
- zend random string (1)
- how to set password in php (1)
- php genpass (1)
- php zend random password (1)
- zend random (1)
- php zend random string (1)
- ramdom password php (1)
- random function to generate password in java (1)
- zend generate random password (1)
- random generated password using jquery (1)
- random password php zend (1)
- vowels random string php (1)
- simple php generate random string (1)
- php generating random password for login page example (1)
- php generate random password (1)
- how to create random string using php (1)
- generate passwords PHP (1)
- how to create generate random password with php (1)
- generate random password with zend (1)
- generate random password javascript (1)
- generate pronounceable passwords perl (1)
- create random password php tutorial (1)
- create random password in php based on date (1)
- create password by random in javascript with validation (1)
- how to generate random password in php (1)
You will also be interested in ,
- Caching of web page using php
- How to display popular posts in wordpress
- Get IP address using gethostbyname() function
- Caching of images using javascript image object
- Appending string using php to a text file
- Hit counter using php
- Calendar Script Using Javascript [Updated]
- Simple Javascript Slideshow
- Simple file upload script using php
- Remote Mysql Connection From CPANEL And Connect To MYSQL Database From Your Local Webserver or Other External Web Server

