in , ,

Random Password generator with PHP


Sometimes we need to create a random password generator in our web application. This random password will be given to the user. This is a nice idea to force users to use a secure password. This is a working random password generation function for PHP. Just include this function anywhere in your code and then use it.

In this code, I have removed the l and 1 because it can create confusion in passwords. It means, generated password will not contain 1 and l both. If you want to use, you can add it in the code. This code will generate a random password with mixture of characters, numbers and special characters.

You can also see the demo of this password generator function from the link below.



Random Password generator with PHP

You can also improve this function to make it better. If you have better code, you can share it with us and I will be happy to share that code with our readers along with giving you full credits for that code.

If you have any kind of problem in implementing this code, comment below to ask your queries.


Written by Deepanker

Deepanker Verma is the founder of Techlomedia. He is a tech blogger, developer and gadget freak.

Leave a Reply

Your email address will not be published. Required fields are marked *


Unzip ZIp php

Backup a Folder To a Zip File With PHP

How to Take Backup of Database into XML with PHP