title: PHP generate a random number using todays date
body: <p>I am trying to assign a block of content (on a webpage) a randomly generated number that is based between todays date (whatever that will be) and a fixed number. For some reason there is dramatic difference in the sorts of numbers being outputted. For example when I test my code locally the numbers generated are good enough for me (in the positive) but when on an actual live server they are generally the opposite and are negative numbers.</p>
  
  <p>This is my one liner:</p>
  
  <pre><code>&lt;?php $today=date('YmdHi'); echo rand(201203140906, $today); ?&gt;
  </code></pre>
  
  <p>Basically '201203140906' is the Year, Month, Day, Hour.</p>
  
  <p>Is this good or bad? Are there better ways to do this?</p>