Monday 12 November 2012

Random char or string number generator in php



When random thing came into the picture means that we use so in so many like online storing data, in data base, applications, store the data and even facebook.com uses. Face book Uses for storing images randomized number and letters in file name (just download any image in face book and check the file name, that contains randomized numbers and letters) Because storing image as file name make difficult in data base over writhing occurs. Using Given file name changes the number and letters in image file name. This is same as the all application
Today I’m going to show simple and easy random number, string and character generator in php. Below I made random string generator that you can give length of string and randomize it first it will give error ignore that ant give length of string and click randomize. i added some style to my application

  Random string genator
   
    
  
  

  
length of string:
If you want number generator just change the inside the for loop line
$string .= chr(rand(97, 122)); 
To
 ”>$string .= rand(0, 15); 

This is generate number between given length minimum value is ‘0’ and maximum value is ‘15’ Make improvement live comment