Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php random string

function rand_str() {
    $characters = '0123456789-=+{}[]:;@#~.?/>,<|!"£$%^&*()abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
    $randomstr = '';
    for ($i = 0; $i < random_int(50, 100); $i++) {
      $randomstr .= $characters[rand(0, strlen($characters) - 1)];
    }
    return $randomstr;
  }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #random #string
ADD COMMENT
Topic
Name
2+4 =