Add function rand_string($length)

Add function rand_string($length)