This below snippet is create random string. you can use as a authentication code or some other purpose.
<?php $string = "abcdefghijklmnopqrstuvwxyz0123456789"; for($i=0;$i<25;$i++){ $pos = rand(0,36); $str .= $string{$pos}; } echo $str; ?>
The above function will return 25 charecter length alphanumeric string.