PHP Script to Generate Random Password. You can set the list of characters that you want to be used in password. You can also set what should be length of password.
<?php
/*
This function generates a random password.
It can contain any set of characters that you specify.
You can also control the length of generated password.
*/
function simplePasswordGenerator($length) {
// This is the list of characters that you want to use for generating random password
$characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890.-+=_,!@$#*%<>[]{}';
$password = array(); //$password as an array, which will later be converted to string
$alphaLength = strlen($characters) - 1; //This is number up to which array index runs
for ($i = 0; $i < $length; $i++) {
$n = rand(0, $alphaLength);
$password[] = $characters[$n];
}
return implode($password); //turn the array into a string
}
// Calling the function
$length=8;
echo simplePasswordGenerator($length);
?>
PHP code to generate password which contains at least one small letter, one capital letter, one number and one special character.
Price $5 Order Now
I want a random Credit Card number generator.
Price $5 Order Now
I want a PHP function to generate random email addresses.
Price $5 Order Now
I want a random IP address generation code. I must be a PHP function.
Price $5 Order Now
PHP Script to scan a text and extract all email ids contained in the text. It outputs email addresses as...
PHP Script to Generate Random Password. You can set the list of characters that you want to be used in...
It is a very nice PHP time ago function. You gave pass any date to it and it will tell...
This PHP function extracts all numbers from a String and prints them as a comma separated list of numbers. Ready...
This is a simple PHP function to parse text provided and automatically hyperlink the links in the text.
This is a simple function written in PHP to generate keywords from any text. Just pass any free text to...
PHP Script to create thumbnail of any image (.jpg, .png and .gif). This create thumbnail function is ready to use....
This PHP Code snippet lists all files in a folder and hyperlinks them accordingly. Very clean, easy to use function....