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
100% Free PHP folder to gallery script. Just give the name of folder and it will generate gallery of all...
PHP Script to scan a text and extract all email ids contained in the text. It outputs email addresses as...
This is a simple function written in PHP to generate keywords from any text. Just pass any free text to...
A very simple php snippet to check if an email id is valid or not. If the email address is...
This is a simple PHP function to parse text provided and automatically hyperlink the links in the text.
PHP Script to extract all links from a web page. This PHP Snippet reads the contents of a web page...
PHP Script to create URL from string. It retails only URL Safe characters in the strings. So, now easily create...
This PHP function extracts all numbers from a String and prints them as a comma separated list of numbers. Ready...