str_shuffle(): shuffle a string

echo str_shuffle($string);
The output is here , you can change this by refreshing this page

Password geenrator script

We can use this to develop a password generator script where we will create random passwords by using different types of chars. We used substr string function to get short string by taking out first 8 chars of the string only.
Here is the code

$string= str_shuffle($string);
echo substr($string,0,8); 
we will get 8 char random string to use as password

In above case we have used three stings and added them before shuffling to generate password string. You can add more strings like all uppercase alphabets etc to generate desired password. We can take user inputs also to use the combination of strings to generate random password.
String Functions password_verify(): To match the password with user entered password mcrypt() function to work with different encryptions
Subscribe to our YouTube Channel here


* indicates required
Subscribe to plus2net



    hey.this site is best.good job friend and wish you all the best carryon..

    Post your comments , suggestion , error , requirements etc here

    PHP video Tutorials
    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 All rights reserved worldwide Privacy Policy Disclaimer