title: Check if a generated license is valid
body: <p>I have a PHP script that generates some strings which will be used as license keys:</p>
  
  <pre><code>function KeyGen(){
       $key = md5(microtime());
       $new_key = '';
       for($i=1; $i &lt;= 25; $i ++ ){
                 $new_key .= $key[$i];
                 if ( $i%5==0 &amp;&amp; $i != 25) $new_key.='-';
       }
    return strtoupper($new_key);
    }
  $x = 0;
  while($x &lt;= 10) {
    echo KeyGen();
    echo "&lt;br /&gt;";
  $x++; 
  }
  </code></pre>
  
  <p>After running the script once, I got these:</p>
  
  <pre><code>8B041-EC7D2-0B9E3-09846-E8C71
  C8D82-514B9-068BC-8BF80-05061
  A18A3-E05E5-7DED7-D09ED-298C4
  FB1EC-C9844-B9B20-ADE2F-0858F
  E9AED-945C8-4BAAA-6938D-713ED
  4D284-C5A3B-734DF-09BD6-6A34C
  EF534-3BAE4-860B5-D3260-1CEF8
  D84DB-B8C72-5BDEE-1B4FE-24E90
  93AF2-80813-CD66E-E7A5E-BF0AE
  C3397-93AA3-6239C-28D9F-7A582
  D83B8-697C6-58CD1-56F1F-58180
  </code></pre>
  
  <p>What I now am trying to do is change it so that I have another function that will check if the key has been generated using my script. Currently, what I am thinking is setting the <code>$key</code> to the MD5 of one specific string (for example, <code>test</code>) but, of course, that returns all the strings the same. </p>
  
  <p>Can anyone help?</p>