title: Better Random Generating PHP
body: <p>I know that just using <code>rand()</code> is predictable, if you know what you're doing, and have access to the server.</p>
  
  <p>I have a project that is <strong>highly</strong> dependent upon choosing a random number that is as unpredictable as possible. So I'm looking for suggestions, either other built-in functions or user functions, that can generate a <em>better</em> random number.</p>
  
  <p>I used this to do a little test:</p>
  
  <pre><code>$i = 0;
  
  while($i &lt; 10000){
      $rand = rand(0, 100);
  
      if(!isset($array[$rand])){
          $array[$rand] = 1;
      } else {
          $array[$rand]++;
      }
  
      sort($array);
      $i++;
  }
  </code></pre>
  
  <p>I found the results to be evenly distributed, and there is an odd pattern to the number of times each number is generated.</p>