Generating a 10 digit random confirmation string php
<p>I am trying to create a 'confirmation code' for every user account created on my website and storing it in the db along with their personal information. As you can see in the example below, I tried to generate a random string factoring in the time variable, however, the string is unneccessarily long. </p>

<p>I would like the string to be shorter than the one produced by <code>md5</code> I was wondering if there is a relatively easy way to generate 10 digit (max) alphanumeric string that has an extremely low collision rate?</p>

<p>What I tried:</p>

<pre><code>  md5(mt_rand(10000,99999).time() . 'example@domain.com');
</code></pre>

<p>Output:</p>

<pre><code>0dd6854dba19e70cfda0ab91595e0376
</code></pre>
