[ create a new paste ] login | about

Link: http://codepad.org/5rHMHwnH    [ raw code | output | fork ]

bsquang - PHP, pasted on Aug 31:
1
2
3
4
5
6
7
8
9
10
11
12
<?php

function rand_string( $length ) {

$chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
return substr(str_shuffle($chars),0,$length);

}

echo rand_string(8);

?>


Output:
1
7Vsum2RG


Create a new paste based on this one


Comments: