title: Md5 unique id good enough for hidden form tokens?
body: <p>I'm using <code>md5(uniqid())</code> to generate a unique hash for my token hidden input on my forms  (like Log in, Sign up, Settings, etc) for my File Sharing and Hosting service and for the user session, so I can compare those two after the form is submitted.</p>
  
  <p>But I'm wondering if <code>md5(uniqid())</code> is good enough after I've read that md5 has lots of security flaws.</p>
  
  <p>Are there better or more secure ways of generating tokens for my forms?</p>
  
  <p><strong>Output example</strong></p>
  
  <pre><code>&lt;input type="hidden" name="token" value="4c1dd84d3458964ee6d59c728dc70160"&gt;
  </code></pre>