PHP Classes

File: randompassword.php

Recommend this page to a friend!
  Classes of Naveen valecha   Random Pass   randompassword.php   Download  
File: randompassword.php
Role: Class source
Content type: text/plain
Description: randompassword.php
Class: Random Pass
Generate a random text string with a given length
Author: By
Last change: Changed the code due the this error
Date: 9 years ago
Size: 410 bytes


Class file image Download

 * The class is use to generate a random password.
 * @author Naveen Valecha<>

class RandomPassword {


  public function
password($length) {

$string = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!@#$%^&*';
$this->password = substr(str_shuffle($string), 0, $length);