Monday 29 October 2012

Random Number Genrate According To Your Varaible

Following Code Used for gen-ratting random number according to you want. If you want to alphabet and numeric comes together and want to give limit of both, like numeric shows 2 value and alphabet shows 3 value, then you can use this random number system.

1. This is very simple random number function and will help you for password generation or  some other task.

2. You can define your character for generation character, For example you need to change following variable.


  $character_set_array = array( );
  $character_set_array[ ] = array( 'count' => 3, 'characters' => 'abcdefghijklmnopqrstuvwxyz' );
  $character_set_array[ ] = array( 'count' => 3, 'characters' => '0123456789' );
  $character_set_array[ ] = array( 'count' => 3, 'characters' => '!@#$&*' );
  $character_set_array[ ] = array( 'count' => 3, 'characters' => '<>?":{}/;'"' );

So then function chose character from every character set but only 3 char from every, Because there is count given 3. So only three character choose from every one.

Function given in following text area just select all, copy and paste in your page. Now just echo function.





 Following, I am giving some output of the function.

  1.  3!:{u#1>yk#1

  2.  &$1l?7]*yo?2

  3. "c]86i!@"*7g

  4.  <@{>6f&h1h4@

  These are the output of the above function.


1 comment: